auto_solve_captcha
Auto-detect and solve Cloudflare captcha challenges on the current page, with verification that protected content loads.
Instructions
Auto-detect and solve a captcha challenge on the current page.
Wraps camoufox_captcha.solve_captcha (same library as project test.py).
Probes the page for captcha indicators, clicks through the challenge, and
verifies the protected content actually loaded.
Args:
captcha_type: Captcha provider, e.g. "cloudflare". The library is
future-proof; new providers (hcaptcha, recaptcha, ...) will be
supported as camoufox_captcha adds them — pass the new name here.
challenge_type: "auto" (recommended), "interstitial", or "turnstile".
"auto" probes both variants and solves whichever is detected.
ready_delay: Seconds to wait for the captcha iframe to mount before
attempting to click.
expected_content_selector: Optional CSS selector to wait for after
solving.
solve_attempts: Maximum solve attempts (passed to solver).
solve_click_delay: Seconds to wait after clicking so the provider
can validate the click.
wait_checkbox_attempts: Maximum polls to wait for the checkbox to appear.
wait_checkbox_delay: Seconds between checkbox-wait polls.
checkbox_click_attempts: Maximum click attempts on the checkbox itself.
attempt_delay: Seconds between top-level solve attempts.
verify: Re-read page.content() after solving and confirm the provider's
challenge marker is gone. Strongly recommended.
Returns: dict with detected, challenge_type_used, solved, attempts, verified, final_url, error (if any).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| verify | No | ||
| ready_delay | No | ||
| captcha_type | No | cloudflare | |
| attempt_delay | No | ||
| challenge_type | No | auto | |
| solve_attempts | No | ||
| solve_click_delay | No | ||
| wait_checkbox_delay | No | ||
| wait_checkbox_attempts | No | ||
| checkbox_click_attempts | No | ||
| expected_content_selector | No |