Documentation
README
Scrapling 网页抓取 Skill
步骤 0:检查版本
pip show scrapling
- 未安装 → 执行
pip install "scrapling[fetchers]"+scrapling install - 有新版 → 执行
pip install --upgrade "scrapling[fetchers]"→ 查 changelog 告知用户 - 已最新 → 继续
步骤 1:选择 Fetcher
目标网站 →
│
├─ 已有 HTML 字符串/文件,只需解析?
│ → Selector(纯解析,无网络请求)
│ → 模板: templates/parse_only.py
│
├─ 静态页面,无 JS 渲染,无反爬?
│ → Fetcher(最快,基于 curl_cffi)
│ → 模板: templates/basic_fetch.py
│
├─ 需要登录(HTTP 表单,非 JS 登录)?
│ → FetcherSession(保持会话 cookie)
│ → 模板: templates/session_login.py
│
├─ 有 Cloudflare / WAF 保护?
│ → StealthyFetcher(Camoufox 浏览器,自动过 CF)
│ → 模板: templates/stealth_cloudflare.py
│
├─ SPA 应用(React/Vue),需要 JS 渲染?
│ → DynamicFetcher(Playwright 浏览器)
│ → 基于模板即时生成
│
└─ 不确定?
→ 先用 Fetcher 试,403/空内容 → 升级到 StealthyFetcher
This is the opening of the README. Read the full README on GitHub.