Answer the question
In order to leave comments, you need to log in
How can I bypass site protection from bots?
I'm trying to implement a bot on a third-party site using selenium, but there is clearly protection from bots: it doesn't allow js to be executed via execute_script - it immediately closes the webdriver, there are no errors in the terminal. All elements are hidden, supposedly invisible. The necessary elements are either constantly re-rendered, or something - you sit, look at the element's code in the developer console, and it is updated. In general, there are options how to deal with this?
Answer the question
In order to leave comments, you need to log in
The task in the general case has no solution, of course, if you agree with the owner of the site - not an option.
Yes, you can learn to forge request headers in python, recognize captcha, you can even build a high-quality dom in memory and process it with js loaded from the pages of the target site, but this only works in special cases. As soon as there is an interest in preventing you from stealing data, the race immediately begins, one comes up with ways to break off the freeloader, the other - how to bypass these checks. Avita, as an example, paid a lot of attention, and maybe still does, to the confrontation with spiders, and, in my case, the solutions found lived from several days to several months, and then they disappeared anyway.
If, nevertheless, the desire has not disappeared, you can try to stop pretending to be a browser and become one in reality. It's about writing plugins that will keep an eye on the page and look for the necessary data on it, collecting them in memory on a separate tab, or sending them to your api for saving. You can try to play around with embedding a browser in your program, but I only played with embedding a donkey in a program on Delphi, and even then, a very long time ago.
There are two solutions. Both are paid:
1) Pay the programmer for updating the protection bypass. The downside is that the programmer may not always do this, and it takes time to update the bot.
2) Use living people. The downside is that it's noticeably slower.
What exactly is more expensive, it is impossible to say for sure.
You can write your own binding around the browser, search for the necessary elements not by code, but by image, and after that emulate clicks on the corresponding coordinates and keyboard input.
If you are too lazy to write all this yourself, you can buy zennoposter, for example, or BAS, these tools allow you to automate everything indicated, recording actions in the form of macros is available + everything has under the hood bypassing fingerprinting in various ways, which actually allows you to use not a single bot, but their whole farm.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question