LeminCaptcha¶
To import this module:
from python_rucaptcha.lemin_captcha import LeminCaptcha
- class python_rucaptcha.lemin_captcha.LeminCaptcha(websiteURL: str, captchaId: str, div_id: str, method: str | LeminCaptchaEnm = LeminCaptchaEnm.LeminTaskProxyless, *args, **kwargs)¶
- __init__(websiteURL: str, captchaId: str, div_id: str, method: str | LeminCaptchaEnm = LeminCaptchaEnm.LeminTaskProxyless, *args, **kwargs)¶
The class is used to work with Lemin Cropped Captcha.
- Parameters:
rucaptcha_key – User API key
websiteURL (str) – Full URL of the captcha page
captchaId (str) – The value of the captcha_id parameter found on the site
div_id (str) – The id of the parent div, which contains the captcha
method (str | LeminCaptchaEnm) – Captcha type
kwargs – Not required params for task creation request
Examples
>>> LeminCaptcha(rucaptcha_key="aa9011f31111181111168611f1151122", ... websiteURL="https://dashboard.leminnow.com/auth/signup", ... captchaId="CROPPED_099216d_8ba061383fa24ef498115023aa7189d4", ... div_id="lemin-cropped-captcha", ... method=LeminCaptchaEnm.LeminTaskProxyless.value, ... api_server="api.leminnow.com" ... ).captcha_handler() { "errorId":0, "status":"ready", "solution":{ "answer":"0xaxakx0xaxaax0xkxx3ox0x3ox3ox_...gAAAAABk8bgzEFOg9i3Jm", "challenge_id":"e0348984-92ec-23af-1488-446e3a58946c" }, "cost":"0.00299", "ip":"1.2.3.4", "createTime":1692863536, "endTime":1692863556, "solveCount":1, "taskId": 73243152973, }
>>> await LeminCaptcha(rucaptcha_key="aa9011f31111181111168611f1151122", ... websiteURL="https://dashboard.leminnow.com/auth/signup", ... captcha_id="CROPPED_099216d_8ba061383fa24ef498115023aa7189d4", ... div_id="lemin-cropped-captcha", ... method=LeminCaptchaEnm.LeminTaskProxyless.value, ... api_server="api.leminnow.com" ... ).aio_captcha_handler() { "errorId":0, "status":"ready", "solution":{ "answer":"0xaxakx0xaxaax0xkxx3ox0x3ox3ox_...gAAAAABk8bgzEFOg9i3Jm", "challenge_id":"e0348984-92ec-23af-1488-446e3a58946c" }, "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