Skip to content

Make Cloudflare Turnstile solving locale-independent #411

Description

@subediparas5

Have you searched if there an existing feature request for this?

  • I have searched the existing requests

Feature description

Problem

The Cloudflare solver currently relies on English text such as <title>Just a moment...</title> and Verifying you are human. to determine whether a challenge is active or solved.

On localized Cloudflare pages—for example, French pages using <title>Un instant…</title>—the solver may incorrectly assume the challenge is solved before clicking the checkbox. The returned response then still contains the Cloudflare challenge page.

Proposed improvement

Make Cloudflare solving language-independent by:

  • Using the existing Cloudflare challenge detector instead of translated page text.
  • Locating non-embedded Turnstile widgets through the stable input[name="cf-turnstile-response"] element.
  • Clicking the widget using its parent container’s bounding box.
  • Applying the behavior to both synchronous and asynchronous stealth sessions.
  • Preserving existing embedded Turnstile behavior.
  • Adding a regression test using a localized challenge page.

Expected behavior

solve_cloudflare=True should detect, click, and wait for Cloudflare challenges correctly regardless of the page language.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions