CyberSiARA¶
To import this module:
from python_rucaptcha.cyber_siara_captcha import CyberSiARACaptcha
- class python_rucaptcha.cyber_siara_captcha.CyberSiARACaptcha(websiteURL: str, SlideMasterUrlId: str, userAgent: str, method: str | CyberSiARAEnm = 'AntiCyberSiAraTaskProxyless', *args, **kwargs)¶
- __init__(websiteURL: str, SlideMasterUrlId: str, userAgent: str, method: str | CyberSiARAEnm = 'AntiCyberSiAraTaskProxyless', *args, **kwargs)¶
The class is used to work with HCaptcha.
- Parameters:
rucaptcha_key – User API key
websiteURL (str) – Full URL of the captcha page
SlideMasterUrlId (str) – The value of the MasterUrlId parameter obtained from the request to the endpoint API/CyberSiara/GetCyberSiara.
userAgent (str) – User-Agent of your browser will be used to load the captcha. Use only modern browser’s User-Agents
method (str | CyberSiARAEnm) – Captcha type
kwargs – Not required params for task creation request
Examples
>>> CyberSiARACaptcha(rucaptcha_key="aa9011f31111181111168611f1151122", ... websiteURL="3ceb8624-1970-4e6b-91d5-70317b70b651", ... SlideMasterUrlId="https://rucaptcha.com/demo/hcaptcha", ... userAgent="Mozilla/5.0 (Windows .....", ... method=CyberSiARAEnm.AntiCyberSiAraTaskProxyless, ... ).captcha_handler() { "errorId":0, "status":"ready", "solution":{ "token": "datadome=4ZXwCBlyHx9ktZhSnycMF...; Path=/; Secure; SameSite=Lax" }, "cost":"0.00299", "ip":"1.2.3.4", "createTime":1692863536, "endTime":1692863556, "solveCount":1, "taskId": 73243152973, }
>>> await CyberSiARACaptcha(rucaptcha_key="aa9011f31111181111168611f1151122", ... websiteURL="3ceb8624-1970-4e6b-91d5-70317b70b651", ... SlideMasterUrlId="https://rucaptcha.com/demo/hcaptcha", ... userAgent="Mozilla/5.0 (Windows .....", ... method=CyberSiARAEnm.AntiCyberSiAraTaskProxyless, ... ).aio_captcha_handler() { "errorId":0, "status":"ready", "solution":{ "token": "datadome=4ZXwCBlyHx9ktZhSnycMF...; Path=/; Secure; SameSite=Lax" }, "cost":"0.00299", "ip":"1.2.3.4", "createTime":1692863536, "endTime":1692863556, "solveCount":1, "taskId": 73243152973, }
- Returns:
Dict with full server response
- captcha_handler(**kwargs) dict ¶
Sync solving method
- Parameters:
kwargs – Parameters for the requests library
- Returns:
Dict with full server response
- Return type:
dict
Notes
Check class docstirng for more info
- async aio_captcha_handler() dict ¶
Async solving method
- Returns:
Dict with full server response
- Return type:
dict
Notes
Check class docstirng for more info