scrapling
Skill405 starsChanged 5 months agoMITView on GitHub
使用 scrapling 进行网页抓取和数据提取。根据目标网站特征自动选择最佳 Fetcher, 生成并执行 Python 脚本完成任务。Use when: (1) 抓取/爬取网页内容或数据(scrape, crawl, fetch page, extract data) (2) 需要绕过 Cloudflare/WAF 等反爬保护 (3) 登录后抓取受保护页面 (4) 解析已有 HTML 提取结构化数据 (5) 用户提供 URL 并要求获取页面内容或特定元素 (6) 批量采集多个页面
11 other projects use a version of this.
Adopted by
Most recently taken up by
- hamzzaqureshi/gravidextheir own version, first seen Nov 8, 2026
- Thanane15M/scrapling-skilltheir own version, first seen Nov 2, 2026
- Rajveerx11/skillstheir own version, first seen Oct 25, 2026
- cloveric/cc-telegram-bridgetheir own version, first seen Oct 9, 2026
- amanning3390/hermeshubtheir own version, first seen Oct 8, 2026
- KCNyu/clawocktheir own version, first seen Aug 21, 2026
Other versions11 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 11
- amanning3390/hermeshub★ 48same name
- tdimino/claude-code-minoan★ 41same name
- KCNyu/clawock★ 23same name
- cloveric/cc-telegram-bridge★ 20same name
- cloveric/tarocub★ 20same name
- sergeeey/Claude-cod-top-2026★ 9same name
- b1mango/Agent-Skills★ 4same name
- hamzzaqureshi/gravidex★ 1same name
- Rajveerx11/skills★ 1same name
- LaoK2017/Agent-Skills★ 0same name
1 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
The file
Files
Scrapling 网页抓取 Skill
步骤 0:检查版本
python -c "import scrapling; print(scrapling.__version__)"按项目使用的包管理器执行(pip / uv 等价命令见 references/maintenance.md):
- 未安装 → 安装
scrapling[fetchers]+scrapling install - 有新版 → 升级 → 查 changelog 告知用户
- 已最新 → 继续
项目根存在
uv.lock或pyproject.toml含[tool.uv],优先用uv(uv add/uv run scrapling install);否则用pip。
步骤 1:安全预检与 quick path
先查阅 references/security.md,确认授权、robots.txt / ToS、Prompt injection、cookie 保存与 redaction 边界。
简单文本 / Markdown / selector 抽取优先用 Scrapling CLI quick path,并默认加 --ai-targeted:
scrapling extract get "https://example.com/article" article.md --ai-targeted
scrapling extract fetch "https://example.com/app" app.md --ai-targeted --network-idle
scrapling extract stealthy-fetch "https://protected.example.com" page.md --ai-targeted --solve-cloudflareCLI 无法满足复杂登录、多页流程、结构化字段或复用代码时,再生成 Python 脚本。
步骤 2:选择 Fetcher
目标网站 →
│
├─ 已有 HTML 字符串/文件,只需解析?
│ → Selector(纯解析,无网络请求)
│ → 模板: parse_only.py
│
├─ 静态页面,无 JS 渲染,无反爬?
│ → Fetcher(最快,基于 curl_cffi)
│ → 模板: basic_fetch.py
│
├─ 需要登录(HTTP 表单,非 JS 登录)?
│ → FetcherSession(保持会话 cookie)
│ → 模板: session_login.py
│
├─ 有 Cloudflare / WAF 保护?
│ → StealthyFetcher(Camoufox 浏览器,自动过 CF)
│ → 模板: stealth_cloudflare.py
│
├─ SPA 应用(React/Vue),需要 JS 渲染?
│ → DynamicFetcher(Playwright 浏览器)
│ → 基于模板即时生成
│
└─ 不确定?
→ 先用 Fetcher 试,403/空内容 → 升级到 StealthyFetcher复杂 crawl / Spider / adaptive scraping / MCP / proxy rotation 等高级能力,不在本轻量 skill 内展开;先查 references/upstream-map.md,再按 upstream 官方文档补充。
步骤 3:执行工作流
1. 检查版本(步骤 0)
2. 安全预检(步骤 1)
3. 查阅 references/site-patterns.md;如果存在 references/site-patterns.local.md,也先查本地 overlay
4. 简单抽取 → 优先 CLI quick path + --ai-targeted
5. 复杂流程 → 用决策树选择 Fetcher,读取对应模板,替换参数,生成完整脚本
6. 执行脚本 / CLI → 返回最小必要结果
7. **沉淀经验(必做)**:
- 新通用站点类型 → 去敏感化后追加到 references/site-patterns.md
- 私有站点 / 公司站点 / 登录态细节 → 追加到 references/site-patterns.local.md(不提交)
- 用户明确授权保存真实 cookie → 保存到 references/cookie-vault.local.md(不提交,必须 redact 输出)
- **完成抓取后必须检查**:是否有新的 cookie 或 site pattern 需要保存,以及是否属于 local overlayGuardrails
- 只抓取用户有权访问或明确授权的内容;不要绕过 paywall、验证码、登录限制或访问控制来获取未授权内容。
- 输出给 agent / LLM 的网页内容默认先清洗、限域或结构化;CLI 输出默认使用
--ai-targeted。 - 真实 cookie / token 不写入
references/cookie-vault.md,只写本地references/cookie-vault.local.md,且必须先获用户授权。 - 公司 / 私有站点经验不写公共
references/site-patterns.md,只写本地references/site-patterns.local.md。 - 大规模 crawl 前先查 robots.txt / ToS,降低并发并加 delay;Spider 场景查 upstream 后优先使用
robots_txt_obey = True。
Cookie 格式速查
| Fetcher 类型 | Cookie 格式 | 示例 |
| Fetcher / FetcherSession | dict | {'name': 'value', 'token': 'abc'} |
| StealthyFetcher / DynamicFetcher | list[dict] | [{'name': 'n', 'value': 'v', 'domain': '.site.com', 'path': '/'}] |
浏览器 Fetcher cookie 必填字段: name, value, domain, path
超时单位速查
| Fetcher 类型 | 超时单位 | 示例 |
| Fetcher / FetcherSession | 秒 | timeout=30 |
| StealthyFetcher / DynamicFetcher | 毫秒 | timeout=60000 |
模板索引
| 模板 | 文件 | 何时读取 |
| 基础 HTTP 抓取 | templates/basic_fetch.py | 目标为静态页面,无反爬 |
| Cloudflare 绕过 | templates/stealth_cloudflare.py | 目标有 CF/WAF 保护 |
| Session 登录 | templates/session_login.py | 需 HTTP 表单登录后抓取 |
| 纯 HTML 解析 | templates/parse_only.py | 已有 HTML 字符串,只需提取数据 |
References 索引
| 文件 | 何时读取 |
references/security.md | 每次抓取前先查阅 — 授权、Prompt injection、cookie / token、site pattern local overlay 规则 |
references/site-patterns.md | 每次抓取前先查阅 — 检查目标站点是否有已记录的模式 |
references/api-quick-ref.md | 生成脚本时查阅 — Fetcher/Selector 方法签名和参数 |
references/troubleshooting.md | 执行报错时查阅 — 按错误信息查找原因和解决方案 |
references/cookie-vault.md | 需要登录 cookie 时查阅 — 只存模板 / 字段名;真实值用 references/cookie-vault.local.md |
references/maintenance.md | 安装/升级/依赖问题时查阅 — 安装层级和验证命令 |
references/upstream-map.md | 需要 CLI quick path、官方 skill 对齐、Spider / adaptive / MCP / proxy 等高级能力时查阅 |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

