Panniantong/Agent-Reach · warning · RuntimeError

Jina Reader 返回了反爬验证页,未获取到目标内容;请改用站点专用工具或浏览器读取

Error message

Jina Reader 返回了反爬验证页,未获取到目标内容;请改用站点专用工具或浏览器读取

What it means

WebChannel.read (agent_reach/channels/web.py:63) detects that Jina Reader returned a Cloudflare/Jina anti-bot challenge page instead of real content (via _is_antibot_page, which matches 'requiring captcha' warnings, 'Just a moment...', and Cloudflare 'Attention Required!' structures in the first 4 KiB). The RuntimeError tells you the target site blocked automated access and suggests site-specific tools or a browser.

Source

Thrown at agent_reach/channels/web.py:63

        self.active_backend = self.backends[0]
        return "ok", "通过 Jina Reader 读取任意网页(curl https://r.jina.ai/URL)"

    def read(self, url: str) -> str:
        """通过 Jina Reader 读取网页,返回 Markdown 全文。"""
        url = normalize_public_http_url(url)
        jina_url = f"https://r.jina.ai/{url}"
        req = urllib.request.Request(
            jina_url,
            headers={"User-Agent": _UA, "Accept": "text/plain"},
        )
        with urllib.request.urlopen(req, timeout=30) as resp:
            body = resp.read(_MAX_RESPONSE_BYTES + 1)
        if len(body) > _MAX_RESPONSE_BYTES:
            raise ValueError(
                f"Jina Reader response exceeds {_MAX_RESPONSE_BYTES} byte limit"
            )
        if _is_antibot_page(body):
            raise RuntimeError(
                "Jina Reader 返回了反爬验证页,未获取到目标内容;"
                "请改用站点专用工具或浏览器读取"
            )
        return body.decode("utf-8")

View on GitHub (pinned to 93ae1d18c3)

Solutions

  1. Switch to the site's official API or an existing agent-reach channel for that platform
  2. Reduce request frequency to r.jina.ai; add spacing between reads
  3. Read the page in a real browser (manual or browser automation) and pass the content to the agent
  4. Try again later — Cloudflare challenges are often intermittent for low-reputation clients

Example fix

# before
from agent_reach.channels.web import WebChannel
text = WebChannel().read("https://cloudflare-protected.example.com/article")

# after: branch on the antibot signal and fall back
from agent_reach.channels.web import WebChannel

try:
    text = WebChannel().read(url)
except RuntimeError as exc:
    if "反爬" in str(exc) or "captcha" in str(exc):
        text = None  # signal caller to use a browser / site-specific tool
    else:
        raise
Defensive patterns

Strategy: fallback

Try / catch

try:
    text = WebChannel().read(url)
except RuntimeError as exc:
    if "反爬" in str(exc):
        text = read_via_site_specific_channel_or_browser(url)  # planned fallback
    else:
        raise

Prevention

When it happens

Trigger: web_channel.read(url) on Cloudflare-protected sites with bot-fight mode enabled, or when Jina itself throttles the caller and returns a 'warning: requiring captcha' interstitial. Only the first 4096 bytes are scanned, so the marker must appear at the top of the Markdown.

Common situations: Agents scraping e-commerce, ticketing, or news sites behind aggressive Cloudflare settings; heavy use of r.jina.ai from one IP causing Jina-side captcha challenges.

Related errors


AI-assisted analysis of Panniantong/Agent-Reach@93ae1d18c3 (2026-08-14). Data as JSON: /api/errors/df7e47cb6314fdc3. Report an issue: GitHub.