Core

To import this module:

from python3_anticaptcha.core import base
class core.base.CaptchaParams(api_key: str, sleep_time: int = 15, *args, **kwargs)

Basic Captcha params class

Parameters:
  • api_key (str) – Capsolver API key

  • sleep_time (int) – The waiting time between requests to get the result of the Captcha

set_callback_url(callbackUrl: str) None

Method for callbackUrl param set.

Parameters:

callbackUrl (str) –

Optional web address where we can send the results of captcha task processing. Contents are sent by AJAX POST request and are identical

to the contents of getTaskResult method.

captcha_handler(**additional_params) dict

Synchronous method for captcha solving

Parameters:

additional_params – Some additional parameters that will be used in creating the task and will be passed to the payload under task key. Like proxyLogin, proxyPassword and etc. - more info in service docs

Returns:

Dict with full server response

Return type:

dict

Notes

Check class docstirng for more info

async aio_captcha_handler(**additional_params) dict

Asynchronous method for captcha solving

Parameters:

additional_params – Some additional parameters that will be used in creating the task and will be passed to the payload under task key. Like proxyLogin, proxyPassword and etc. - more info in service docs

Returns:

Dict with full server response

Return type:

dict

Notes

Check class docstirng for more info