2captcha / 2captcha-python

Python 3 package for easy integration with the API of 2captcha captcha solving service to bypass recaptcha, hcaptcha, funcaptcha, geetest and solve any other captchas.
https://2captcha.com
MIT License
495 stars 93 forks source link

Geetest3 always returning ERROR_CAPTCHA_UNSOLVABLE #54

Closed flo-wolf closed 1 year ago

flo-wolf commented 1 year ago

I am trying to solve a Geetest3 captcha using the 2captcha API. For each of my over 30 captchas I tried to solve I get a few 200 responses stating CAPCHA_NOT_READY for a few seconds, and then I get a 200 with ERROR_CAPTCHA_UNSOLVABLE.

All of these show up within my dashboard on the 2captcha website, where I can see all of my requests coming in, yet each one of them was apparently unsolvable. Is there currently a bug with the way Geecaptchas are processed?

kratzky commented 1 year ago

I'm 99% sure you don't get the challenge parameter value properly. The value can be used only once to render the GeeTest widget. If there already was a request to GeeTest API with the challenge value, we can't load the captcha and solve it.

flo-wolf commented 1 year ago

I'm 99% sure you don't get the challenge parameter value properly. The value can be used only once to render the GeeTest widget. If there already was a request to GeeTest API with the challenge value, we can't load the captcha and solve it.

That wasn't the problem, the challenge was correct. The solution was to stop my selenium chrome webdriver from making any calls to the Geetest GET API, which would sort of "eat up" the challenge locally. This prevents the challenge from being loaded within my webdriver, thus the checkbox etc doesn't appear, and I can safely send the challenge to 2Captcha, where it gets "used up" and can be solved:

driver.execute_cdp_cmd('Network.setBlockedURLs', {"urls": ["https://api.geetest.com/get.*"]})
driver.execute_cdp_cmd('Network.enable', {})`