Skip to content

Clients

The universal multi-provider client. Solver is the blocking client; AsyncSolver is the asyncio-native peer.

The universal multi-provider client (ADR-0005, ADR-0062, ADR-0064).

Solver / AsyncSolver register adapters (keyed by their provider string), dispatch challenges to them, and delegate execution to the internal engines. Routing/validation lives here; execution lives in the engines.

Solver

Universal blocking client over a set of registered adapters.

supports

supports(kind)

Whether any registered provider supports the challenge kind.

kind is a kind-base class (RecaptchaV2Challenge) or a tag string ("recaptcha-v2", as returned by unicaptcha.detect). Never raises for a valid-but-unsupported kind; unknown kinds raise TypeError.

providers_supporting

providers_supporting(kind)

The provider names supporting the kind, in registration order.

supported_kinds

supported_kinds()

Tags of the kinds covered by at least one registered provider.

auto_solve

auto_solve(
    html,
    pageurl,
    provider=None,
    *,
    time=None,
    retry=None,
    on_event=None,
)

Detect and solve the first captcha in html (ADR-0077).

Raises NoCaptchaDetectedError when the page has no supported captcha. Pages with several captchas use detect() + solve() directly. The returned fill maps DOM selectors to the solved values; the caller injects them into the live page.

AsyncSolver

Universal asyncio-native client over a set of registered adapters.

supports

supports(kind)

Whether any registered provider supports the challenge kind.

Synchronous even on AsyncSolver: derived purely from the adapter registry, no I/O. kind is a kind-base class or a tag string; unknown kinds raise TypeError.

providers_supporting

providers_supporting(kind)

The provider names supporting the kind, in registration order.

supported_kinds

supported_kinds()

Tags of the kinds covered by at least one registered provider.

auto_solve async

auto_solve(
    html,
    pageurl,
    provider=None,
    *,
    time=None,
    retry=None,
    on_event=None,
)

Detect and solve the first captcha in html (ADR-0077).

Raises NoCaptchaDetectedError when the page has no supported captcha. Pages with several captchas use detect() + solve() directly. The returned fill maps DOM selectors to the solved values; the caller injects them into the live page.