Skip to content

service

service

__all__ = ['BaseService', 'CaptchaService'] module-attribute

BaseService

Bases: BaseClass

Base class for services in the system.

__init__() -> None

Initializes the BaseService.

CaptchaService

Bases: BaseService

Service for solving captchas.

__init__() -> None

Initializes the CaptchaService.

solve(version: str, key: str, url: str, action: str = 'verify') -> str

Solves a captcha.

Parameters:

Name Type Description Default
version str

The version of the captcha (e.g., 'v2' or 'v3').

required
key str

The captcha key.

required
url str

The URL where the captcha is located.

required
action str

The action to perform. Defaults to 'verify'.

'verify'

Raises:

Type Description
Exception

If the captcha version is not implemented.

Returns:

Name Type Description
str str

The solution to the captcha.