#459·Scrapling

Should "No Cloudflare challenge found." be logged at ERROR level?

Author: gyf9835Created Sep 23, 2026Updated Sep 23, 2026

What would you like to share?

Version: scrapling 0.4.10

In _cloudflare_solver, when no challenge is detected, the result is logged at ERROR level:

scrapling/engines/_browsers/_stealth.py:388-391 (async; same in the sync path at :114-116)

python
challenge_type = self._detect_cloudflare(await ResponseFactory._get_async_page_content(page))
if not challenge_type:
    log.error("No Cloudflare challenge found.")
    return None

The solver is invoked unconditionally whenever the flag is set (_stealth.py:529):

python
if params.solve_cloudflare:
    await self._cloudflare_solver(page)

The docs describe the flag as doing the detection itself: The solve_cloudflare parameter enables automatic detection and solving all types of Cloudflare’s Turnstile/Interstitial challenges Question 1: Given that wording, is it intended/correct usage to pass solve_cloudflare=True for every request on a protected site — i.e. let the library decide per page whether a challenge is actually there? Or is the intent that callers detect the challenge themselves and only enable the flag for those specific requests? Question 2: If the first reading is correct, then “no challenge on this page” is a normal, expected outcome for the majority of requests, and ERROR seems like the wrong level — debug or info would fit better. It’s not just cosmetic: log is the contextvar-backed LoggerProxy, and Spider.__run binds it to the spider’s own logger via set_logger(self.logger) (scrapling/spiders/spider.py:256). So every clean page load increments log_count/error in the crawl stats, which makes it hard to use that counter as a health signal for a run. If ERROR is deliberate (i.e. the flag is meant to be enabled only when a challenge is known to be present), it would help to state that explicitly in the docs, since the current wording suggests the detection is the library’s job. Thanks for the great library!

Additional information

No response