Skip to content

Detect

HTML captcha detection and the auto-solve result. detect parses a page's source (stdlib only) and returns the captchas it finds as ready-to-solve kind-base challenges; auto_solve on Solver / AsyncSolver solves the first match and returns an AutoSolveResult whose fill map tells the caller which DOM field each solved value belongs to.

HTML captcha detection and the auto-solve result (ADR-0077).

detect(html, pageurl) parses a page's source with the stdlib-only scanner in unicaptcha._internal._html and returns the captchas it finds as ready-to-solve kind-base challenges (DOM order). Solver / AsyncSolver expose auto_solve which detects, solves the first match via the existing dispatch (ADR-0064), and wraps the outcome in an AutoSolveResult whose fill map tells the caller which DOM field each solved value belongs to.

Image/text captchas are API-driven, not HTML-detectable, and are out of scope; FunCaptcha has no standard injectable field and yields an empty fill (the token is delivered via the page's Arkose callback).

DetectedChallenge dataclass

A captcha found in a page's HTML.

challenge is a kind-base challenge ready to pass to Solver.solve / AsyncSolver.solve; signals is the human-readable evidence that led to the detection.

AutoSolveResult dataclass

Outcome of an auto_solve call.

result is the typed solve result; fill maps DOM selectors to the solved values for the caller to inject into the live page (no browser built in). detected records what was solved and why.

detect

detect(html, pageurl)

Detect the captchas present in a page's HTML source.

Returns kind-base challenges in document order; an empty tuple when no supported captcha is found. pageurl is required — the solved token is bound to that domain.