How to bypass captcha on Diggernaut web scraping platform: Solving Google reCaptcha v 2 by token API

How to bypass captcha on Diggernaut web scraping platform: Solving Google reCaptcha v2

Google reCaptcha v2 is not a problem for our users anymore. We recently implemented integration with Death by Captcha service and you can easily bypass such captcha now.

Lets see how reCaptcha v2 looks like:

Bypass catcha: intentifying reCaptcha v2 by token API

If you see such captcha on the website you need to scrape, you can continue reading as we are going to give you guide how to implement it in your web scraper. And we will use real example for it, we will scrape this website: http://www.receita.fazenda.gov.br/PessoaJuridica/CNPJ/cnpjreva/Cnpjreva_Solicitacao2.asp.

To use this solution you need to have account with Death by Captcha service. This service is not free, solving 1000 such captchas will cost you approx 2.89$ (at least this price was actual on 02.28.2018).

Captcha solving is done automatically, you need to load page with captcha and call special command captcha_resolve with specific parameters:

prodiver: captcha solution provider, should be set to deathbycaptcha.com
type: captcha type, should be set to nocaptchav2
username: your death by captcha account username
password: your death by captcha account password

Also please NOTE!!! To have such captcha successfully resolved, persons who resolve your captcha should be able to connect page with captcha using same IP as your web scraper. So, the only way to achieve it is to use YOUR OWN PROXY SERVER in the digger configuration. Our rotating proxies cannot be accessed by any IP outside of our network, so they cannot be used for this operation.

So base code for our scraper to resolve captcha would be:

Dont run this code yet. If captcha is successfully resolved, you get token value in the captcha variable. So first thing we going to do after captcha resolve process is to check if we have some value in the variable and depending on check results either retry call or submit token to the server and get the results.

You should get following data when you run it

This particular solution can be used in “Data on demand” scenario, when someone enter number on your website, your website sends command to the Diggernaut API to run digger with specific incoming parameter and then return results back to your website and its render results to your user. Just please note, that captcha resolve process is not very fast, for example resolve process for reCaptcha v2 may take more than minute.

But in any case we are hoping that this article was useful for you and you now know, how to bypass recaptcha v2 with Diggernaut and Death by Captcha. We are planning to implement other captcha solutions soon, so please keep tuned.

Co-founder of cloud based web scraping and data extraction platform Diggernaut

1 comment

Leave a Reply

Your email address will not be published. Required fields are marked *