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

AttributeError: 'TwoCaptcha' object has no attribute 'hcaptcha' #67

Closed JakubLudvik closed 3 weeks ago

JakubLudvik commented 10 months ago
solver = TwoCaptcha('Hidden)

try:
    login_response = requests.post('https://discord.com/api/v9/auth/login', json=login_payload)

    captcha_key = solver.hcaptcha(
        sitekey='f5561ba9-8f1e-40ca-9b5b-Hidden',
        url='https://discord.com/api/v9/auth/login')

    login_response.raise_for_status()
except requests.exceptions.HTTPError as err:
    print(f"Login Failed with status code {err.response.status_code}: {err.response.text}")
    raise
poplers24 commented 3 months ago

@JakubLudvik Good afternoon, try running the code using the python3 command. Example: python3 main.py Or use a virtual environment.

And please let me know the result.

kratzky commented 2 months ago

Please check https://github.com/2captcha/2captcha-python/issues/68#issuecomment-1920974503