SuperAPI AI 工具集

scrapling

数据与分析

查看项目

更新于 10-15 17:33

技能介绍

用途:使用 scrapling 进行网页抓取与数据提取,按目标网站特征自动选择最佳 Fetcher,生成并执行 Python 脚本完成任务。适用于抓取/爬取网页内容或数据、需要绕过反爬或渲染 JS 的场景。

主要能力与用法:先检查版本 python -c "import scrapling; print(scrapling.version)",未安装则安装 scrapling[fetchers] 并执行 scrapling install;项目根有 uv.lock 或 pyproject.toml 含 [tool.uv] 时优先用 uv。简单文本、Markdown 或 selector 抽取优先用 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-cloudflare。复杂登录、多页流程或结构化字段再生成 Python 脚本。

Fetcher 选择:已有 HTML 只需解析用 Selector;静态无反爬用 Fetcher;HTTP 表单登录用 FetcherSession;Cloudflare/WAF 用 StealthyFetcher;SPA 需 JS 渲染用 DynamicFetcher;不确定先用 Fetcher,遇 403 或空内容升级到 StealthyFetcher。

限制与注意:只抓取有权访问或明确授权的内容,不绕过 paywall、验证码、登录限制或访问控制;大规模 crawl 前查 robots.txt/ToS,降低并发并加 delay。真实 cookie/token 只写本地 references/cookie-vault.local.md 且需用户授权;私有站点经验只写本地 site-patterns.local.md。复杂 crawl、Spider、adaptive scraping、MCP、proxy rotation 等高级能力不在本轻量 skill 内展开,需查 upstream 官方文档。