Problem with invisible ReCaptcha v2 callback function at Mail.com Sign-up page

goodmak

New member
I found a solution. I insert a button to the webpage then click on the button to execute function handleCaptcha
I little bit modified code for Selenium. THX for idea
06-01 14-04-02.jpg
 

mehmet19077

New member
Hi, is the method you mentioned above valid for hcaptcha? When I search "___grecaptcha_cfg.clients[0]" like this, I can't find any results.
 
Last edited:

omarelmaria

New member
Hello everyone,

I came across this form while looking for a way to solve a Recaptcha v2 with a callback function. I've found the forum super helpful, but I am still stuck at the step after solving the Recaptcha.

After I obtain the token with the 2captcha service, I need to invoke the Recaptcha callback and provide it with the token. I found the callback function using @Mark Miller's amazing GitHub gist (see the attached screenshot). When I invoke the callback in the Console in Chrome Dev tools and provide it with the token from 2captcha, I bypass the captcha successfully and get redirected to the search results.

I can invoke the callback function in two ways:
window[___grecaptcha_cfg.clients[0].o.o.callback]('captcha_token')
or
verifyAkReCaptcha('captcha_token')

However, when I invoke these functions using the driver.execute_script() method in Python Selenium, I get an error. I also tried executing other standard Javascript functions with this method (e.g., scrolling down a page), and I keep getting errors. It's likely because domain I am trying to crawl prevents me from executing any Javascript with automation tools.

So, my question is, how can I invoke the callback function after I obtain the token from the 2captcha service?

Some extra info to help with my question:
1. Automation framework used --> Python Selenium or scrapy. Both are fine by me
2. Code --> In the txt file attached
3. Error messages --> Attached
4. The URL I am trying to crawl -->
"https://suchen.mobile.de/fahrzeuge/...ue&ms=8600;51;;&ref=quickSearch&sb=rel&vc=Car"

Thank you very much for your help in advance. You'd be helping a brother in dire need :D
 

Attachments

  • Callback function.png
    Callback function.png
    103.8 KB · Views: 26
  • selenium_code.txt
    1.4 KB · Views: 16
  • err message 1.png
    err message 1.png
    99.6 KB · Views: 25
  • err message 2.png
    err message 2.png
    88.5 KB · Views: 25