Closed leopoliveira closed 2 years ago
Well pretty simple, Selenium emulates a browser, this bot only emulates the requests sent by the browser :)
That is awesome. Emulating requests is better than emulate a browser, like selenium does?
I started to read your code, especially where you send attacks and can't find where you send the request :S.
Well better is a bold statement but easier, yes. Using direct requests allowed me to create a generic wrapper for all requests to TW. This, in relation to Selenium, is a lot harder to detect because the browser session remains valid.
All requests are sent from this file core/request.py
. It uses the Python requests library to "fake" the browser's requests.
Got it. I think that the only issue you have now is about captcha, isn't it ? This situation require manually action to let bot keeping its job. This is some feature that can be done or it is impossible throght requests?
Well that is not an issue of the bot. The only proper way to solve the captcha issue is to pay someone to solve them for you (a lot of commercial bots do it this way) but that totally defeats the purpose of open source :)
Right now, the only proper way to deal with them is just check-in every hour or enable the remote logger so you can check if the bot runs into a captcha using a database/web interface. Or just limit the amount of actions because from what I've observed, the amount of captchas is based on hours of activity + amount of actions.
You are right, Thank you for the answers.
I am trying to undestand how the bot works and I have a question:
Some other bots use Selenium or something like that to make actions.
But I didn't see anything like that on this bot. How can you make actions on game without these tools ?