AGENT SKILL
scrape-cloudflare-site
Fetch web pages (e.g. novel chapters) that return a Cloudflare "Just a moment" page to curl or headless Chrome.
- License 许可
- MIT
- 最近更新
- 2026-11-08
- Stars
- ★ 927
- Forks
- 166
01 前言 Front Matter
- name
- scrape-cloudflare-site
- description
- Fetch web pages (e.g. novel chapters) that return a Cloudflare "Just a moment" page to curl or headless Chrome.
03 SKILL.md 正文
Scraping pages behind Cloudflare
Do NOT try direct curl or headless Chrome first; both get the challenge page and waste turns.
- Fetch through the reader proxy:
curl -s "https://r.jina.ai/<full original URL>". The real text follows aMarkdown Content:marker. - Write ONE Python script that loops over all pages and saves each to disk, rather than one tool call per page. Skip files already saved so reruns resume.
- Sleep ~1s between requests. A ~240-byte body or
RateLimitTriggeredErrormeans HTTP 429: wait 10-30s and retry. - Multi-page chapters may continue at
<name>_2.html; fetch and join them. - After the loop, print count and byte size per file; re-fetch any that are tiny.
- If the proxy returns a 403
AbuseAlleviationErrorsaying "blocked until <time>", STOP. Do not poll or loop; every retry extends the block. Tell the user the time and finish.
04 同仓库更多 Skills
lint-py
Run lints on Python files.
★ 927
add-component
Scaffold a new React component.
★ 927
commit-helper
Generate a conventional-commit message from staged changes.
★ 927
epub-ebooklib
Build an EPUB with Python ebooklib without producing empty chapters; use whenever creating .epub files.
★ 927