From 13d33b26f2088faca323cb06a918b90ef5b71fa5 Mon Sep 17 00:00:00 2001 From: Andrei Date: Sat, 5 Oct 2024 23:07:02 +0300 Subject: [PATCH] Update image_captcha.py --- src/python3_anticaptcha/image_captcha.py | 30 +++++++++++++++++++----- 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/src/python3_anticaptcha/image_captcha.py b/src/python3_anticaptcha/image_captcha.py index 60a0fda..dbb9e71 100644 --- a/src/python3_anticaptcha/image_captcha.py +++ b/src/python3_anticaptcha/image_captcha.py @@ -31,18 +31,36 @@ def __init__( Examples: >>> ImageToTextCaptcha(api_key="99d7d111a0111dc11184111c8bb111da", - ... captcha_type="TurnstileTaskProxyless", - ... websiteURL="https://rucaptcha.com/demo/cloudflare-turnstile", - ... websiteKey="0x4AAAAAAAC3DHQFLr1GavRN" - ... ).captcha_handler() + ... save_format=SaveFormatsEnm.CONST + ... ).captcha_handler(captcha_file='files/captcha-image.jpg') { "errorId": 0, "errorCode": None, "errorDescription": None, "status":"ready", "solution":{ - "token":"0.Qz0.....f1", - "userAgent":"Mozilla/.....36" + "text":"qGphJD", + "url":"http://69.65.31.125/986/172815194092195.jpg" + }, + "cost": 0.002, + "ip": "46.53.249.230", + "createTime": 1679004358, + "endTime": 1679004368, + "solveCount": 0, + "taskId": 396687629 + } + + >>> ImageToTextCaptcha(api_key="99d7d111a0111dc11184111c8bb111da", + ... save_format=SaveFormatsEnm.CONST + ... ).captcha_handler(captcha_link='https://........../captcha-image.jpg') + { + "errorId": 0, + "errorCode": None, + "errorDescription": None, + "status":"ready", + "solution":{ + "text":"qGphJD", + "url":"http://69.65.31.125/986/172815194092195.jpg" }, "cost": 0.002, "ip": "46.53.249.230",