How can I bypass the Google CAPTCHA with Selenium and Python?

To start with using Selenium‘s Python clients, you should avoid solving/bypass Google CAPTCHA.


Selenium

Selenium automates browsers. Now, what you want to achieve with that power is entirely up to individuals, but primarily it is for automating web applications through browser clients for testing purposes and of coarse it is certainly not limited to that.


CAPTCHA

On the other hand, CAPTCHA (the acronym being …Completely Automated Public Turing test to tell Computers and Humans Apart…) is a type of challenge–response test used in computing to determine if the user is human.

So, Selenium and CAPTCHA serves two completely different purposes and ideally shouldn’t be used to achieve any interrelated tasks.

Having said that, reCAPTCHA can easily detect the network traffic and identify your program as a Selenium driven bot.


Generic Solution

However, there are some generic approaches to avoid getting detected while web scraping:


This use case

However, in a couple of use cases we were able to interact with the reCAPTCHA using Selenium and you can find more details in the following discussions:


References

You can find a couple of related discussion in:


tl; dr

Leave a Comment