AmazonWAF¶
To import this module:
from python_rucaptcha.amazon_waf import AmazonWAF
- class python_rucaptcha.amazon_waf.AmazonWAF(websiteURL: str, websiteKey: str, iv: str, context: str, method: str | AmazonWAFCaptchaEnm = AmazonWAFCaptchaEnm.AmazonTaskProxyless, *args, **kwargs)¶
- __init__(websiteURL: str, websiteKey: str, iv: str, context: str, method: str | AmazonWAFCaptchaEnm = AmazonWAFCaptchaEnm.AmazonTaskProxyless, *args, **kwargs)¶
The class is used to work with Amazon WAF
- Parameters:
rucaptcha_key – User API key
websiteURL (str) – Full URL of the captcha page
websiteKey (str) – Key value from the page
iv (str) – Value iv from the page
context (str) – Value of context from page
method (str | AmazonWAFCaptchaEnm) – Captcha type
Examples
>>> AmazonWAF(rucaptcha_key="aa9011f31111181111168611f1151122", ... websiteURL="https://page-with-waf.com/", ... websiteKey="some-site-key", ... iv="some-iv-value", ... context="some-context-value").captcha_handler() { "errorId":0, "status":"ready", "solution":{ "captcha_voucher":"eyJ0eXAiO...oQjTnJlBvAW4", "existing_token":"f8ab5749-f916-...5D8yAA39JtKVbw=" }, "cost":"0.00145", "ip":"1.2.3.4", "createTime":1692863536, "endTime":1692863556, "solveCount":0, "taskId": 73243152973, }
>>> AmazonWAF(rucaptcha_key="aa9011f31111181111168611f1151122", ... websiteURL="https://page-with-waf.com/", ... websiteKey="some-site-key", ... iv="some-iv-value", ... context="some-context-value").aio_captcha_handler() { "errorId":0, "status":"ready", "solution":{ "captcha_voucher":"eyJ0eXAiO...oQjTnJlBvAW4", "existing_token":"f8ab5749-f916-...5D8yAA39JtKVbw=" }, "cost":"0.00145", "ip":"1.2.3.4", "createTime":1692863536, "endTime":1692863556, "solveCount":0, "taskId": 73243152973, }
- Returns:
Dict with full server response
- captcha_handler(**kwargs) dict ¶
Synchronous method for captcha solving
- Returns:
Dict with full server response
- Return type:
dict
Notes
Check class docstirng for more info
- async aio_captcha_handler() dict ¶
Asynchronous method for captcha solving
- Returns:
Dict with full server response
- Return type:
dict
Notes
Check class docstirng for more info