2captcha / 2captcha-python

Python 3 package for easy integration with the API of 2captcha captcha solving service to bypass recaptcha, hcaptcha, сloudflare turnstile, funcaptcha, geetest and solve any other captchas.
https://pypi.org/project/2captcha-python
MIT License
532 stars 91 forks source link

How to pass data-s parameter to solve recaptcha on google.com/sorry/index #12

Closed theshahzaibc closed 3 years ago

theshahzaibc commented 3 years ago

I have read the document when we have to pass google.com search we got a value of data-s and have to pass to 2captcha. How I can pass the parameter data-s??

2captcha commented 3 years ago

Just add datas parameter to your solver.recaptcha call like:

try:
    result = solver.recaptcha(
        sitekey='SITEKEY',
        url='URL',
        datas='value'
        )

except Exception as e:
    sys.exit(e)

The API accepts both data-s and datas. That is made because in many programming languages you can't use hyphen in variable or property names. But looks like it is not documented fine enough. We'll update the docs in the nearest future.