AndreiDrang / python-rucaptcha

Python library for RuCaptcha\2Captcha.
https://andreidrang.github.io/python-rucaptcha/
MIT License
94 stars 29 forks source link

The captcha report capability/example #71

Closed asimaranov closed 2 years ago

asimaranov commented 4 years ago

I couldn’t find the captcha report example (https://rucaptcha.com/res.php?key=1abc234de56fab7c89012d34e56fa7b8&action=reportbad&id=2122988149 from documentation). How can I do it?

asimaranov commented 4 years ago

The answer is

answer = ReCaptchaV2.ReCaptchaV2(rucaptcha_key=RUCAPTCHA_KEY).captcha_handler(
            site_key=SITE_KEY, page_url=PAGE_URL
        )
...
report = RuCaptchaControl.RuCaptchaControl(rucaptcha_key=RUCAPTCHA_KEY).additional_methods(
                action="reportgood", id=answer["taskId"], json=1
            )
            print(report)

But I think it would be very usefull to add result reporting to examples