Prosopo¶
To import this module:
from python3_anticaptcha.prosopo_captcha import Prosopo
- class python3_anticaptcha.prosopo_captcha.Prosopo(api_key: str, websiteURL: str, websiteKey: str, captcha_type: CaptchaTypeEnm | str = CaptchaTypeEnm.ProsopoTaskProxyless, proxyType: ProxyTypeEnm | str | None = None, proxyAddress: str | None = None, proxyPort: int | None = None, proxyLogin: str | None = None, proxyPassword: str | None = None, userAgent: str | None = None, sleep_time: int | None = 10)¶
- __init__(api_key: str, websiteURL: str, websiteKey: str, captcha_type: CaptchaTypeEnm | str = CaptchaTypeEnm.ProsopoTaskProxyless, proxyType: ProxyTypeEnm | str | None = None, proxyAddress: str | None = None, proxyPort: int | None = None, proxyLogin: str | None = None, proxyPassword: str | None = None, userAgent: str | None = None, sleep_time: int | None = 10)¶
The class is used to work with Prosopo captcha.
- Parameters:
api_key (str) – Capsolver API key
captcha_type (CaptchaTypeEnm | str) – Captcha type
websiteURL (str) – Address of the webpage
websiteKey (str) – Prosopo sitekey
proxyType (ProxyTypeEnm | str | None) – Type of the proxy
proxyAddress (str | None) – Proxy IP address IPv4/IPv6. Not allowed to use: host names instead of IPs, transparent proxies (where client IP is visible), proxies from local networks (192.., 10.., 127…)
proxyPort (int | None) – Proxy port.
proxyLogin (str | None) – Proxy login.
proxyPassword (str | None) – Proxy password.
userAgent (str | None) – Browser UserAgent.
sleep_time (int | None) – The waiting time between requests to get the result of the Captcha
Examples
>>> Prosopo(api_key="99d7d111a0111dc11184111c8bb111da", ... captcha_type="ProsopoTaskProxyless", ... websiteURL="https://demo.arkoselabs.com", ... websiteKey="FCMDESUD3M34857N" ... ).captcha_handler() { "errorId": 0, "errorCode": None, "errorDescription": None, "status":"ready", "solution":{ "token":"0.Qz0.....f1", "userAgent":"Mozilla/5.0 (Wind.....", }, "cost": 0.002, "ip": "46.53.249.230", "createTime": 1679004358, "endTime": 1679004368, "solveCount": 0, "taskId": 396687629 }
>>> await Prosopo(api_key="99d7d111a0111dc11184111c8bb111da", ... captcha_type="ProsopoTaskProxyless", ... websiteURL="https://demo.arkoselabs.com", ... websitePublicKey="DF9C4D87-CB7B-4062-9FEB-BADB6ADA61E6" ... ).aio_captcha_handler() { "errorId": 0, "errorCode": None, "errorDescription": None, "status":"ready", "solution":{ "token":"0.Qz0.....f1", "userAgent":"Mozilla/5.0 (Wind.....", }, "cost": 0.002, "ip": "46.53.249.230", "createTime": 1679004358, "endTime": 1679004368, "solveCount": 0, "taskId": 396687629 }
>>> Prosopo(api_key="99d7d111a0111dc11184111c8bb111da", ... captcha_type="ProsopoTask", ... websiteURL="https://demo.arkoselabs.com", ... websitePublicKey="DF9C4D87-CB7B-4062-9FEB-BADB6ADA61E6", ... proxyType="http", ... proxyAddress="0.0.0.0", ... proxyPort=9988, ... proxyLogin="proxy_login", ... proxyPassword="proxy_password", ... userAgent="some_real_user_agent", ... ).captcha_handler() { "errorId": 0, "errorCode": None, "errorDescription": None, "status":"ready", "solution":{ "token":"0.Qz0.....f1", "userAgent":"Mozilla/5.0 (Wind.....", }, "cost": 0.002, "ip": "46.53.249.230", "createTime": 1679004358, "endTime": 1679004368, "solveCount": 0, "taskId": 396687629 }