KeyCaptcha¶
To import this module:
from python_rucaptcha.key_captcha import KeyCaptcha
- class python_rucaptcha.key_captcha.KeyCaptcha(websiteURL: str, s_s_c_user_id: str, s_s_c_session_id: str, s_s_c_web_server_sign: str, s_s_c_web_server_sign2: str, method: str | KeyCaptchaEnm = KeyCaptchaEnm.KeyCaptchaTaskProxyless, *args, **kwargs)¶
- __init__(websiteURL: str, s_s_c_user_id: str, s_s_c_session_id: str, s_s_c_web_server_sign: str, s_s_c_web_server_sign2: str, method: str | KeyCaptchaEnm = KeyCaptchaEnm.KeyCaptchaTaskProxyless, *args, **kwargs)¶
- The class is used to work with KeyCaptcha. - Parameters:
- rucaptcha_key – User API key 
- websiteURL (str) – Full URL of the captcha page 
- s_s_c_user_id (str) – Value of s_s_c_user_id parameter found on the page 
- s_s_c_session_id (str) – Value of s_s_c_session_id parameter found on the page 
- s_s_c_web_server_sign (str) – Value of s_s_c_web_server_sign parameter found on the page 
- s_s_c_web_server_sign2 (str) – Value of s_s_c_web_server_sign2 parameter found on the page 
- method (str | KeyCaptchaEnm) – Captcha type 
- kwargs – Not required params for task creation request 
 
 - Examples - >>> KeyCaptcha(rucaptcha_key="aa9011f31111181111168611f1151122", ... pageurl="https://rucaptcha.com/demo/keycaptcha", ... s_s_c_user_id="184015", ... s_s_c_session_id="0917788cad24ad3a69813c4fcd556061", ... s_s_c_web_server_sign="02f7f9669f1269595c4c69bcd4a3c52e", ... s_s_c_web_server_sign2="d888700f6f324ec0f32b44c32c50bde1", ... method=KeyCaptchaEnm.KeyCaptchaTaskProxyless.value ... ).captcha_handler() { "captchaSolve": "d58....61|1", "taskId": 73052314114, "error": False, "errorBody": None } - >>> await KeyCaptcha(rucaptcha_key="aa9011f31111181111168611f1151122", ... pageurl="https://rucaptcha.com/demo/keycaptcha", ... s_s_c_user_id="184015", ... s_s_c_session_id="0917788cad24ad3a69813c4fcd556061", ... s_s_c_web_server_sign="02f7f9669f1269595c4c69bcd4a3c52e", ... s_s_c_web_server_sign2="d888700f6f324ec0f32b44c32c50bde1", ... method=KeyCaptchaEnm.KeyCaptchaTaskProxyless.value ... ).aio_captcha_handler() { "captchaSolve": "P1_eyJ.....cp_J", "taskId": 73052314114, "error": False, "errorBody": None } - 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 
 
