强大的网页抓取技能,基于 Scrapling 自动绕过 Cloudflare/反爬。触发词:抓取网页、爬取、scrape、fetch、抓取内容、提取网页、获取页面。使用场景:① 抓取被 Cloudflare 保护的网页;② 提取页面内容;③ 网页数据采集;④ 动态渲染页面抓取。自动安装:...
基于 Scrapling 的网页抓取技能。 自动绕过 Cloudflare Turnstile,无需手动处理验证码。
✅ 完全嵌入分发 - 包含所有 Python 依赖,支持离线安装 ✅ 自动安装 Python - 自动检测并安装 Python 3.10+ ✅ 自动绕过 Cloudflare - 无需手动处理验证码 ✅ 多种抓取模式 - Fast / Stealthy / Dynamic
直接说:
模式用途特点auto自动选择默认模式,适合大多数情况stealthy隐身抓取绕过 Cloudflare,解验证码dynamic动态渲染完整浏览器,JS 执行fast快速 HTTP轻量级,适合简单页面
bash
# 基础抓取
python3 scripts/fetch.py "https://example.com"
# 绕过 Cloudflare
python3 scripts/fetch.py "https://protected-site.com" --mode stealthy
# 提取特定元素
python3 scripts/fetch.py "https://shop.com" --selector ".product-title"
# 输出 Markdown
python3 scripts/fetch.py "https://blog.com/article" --markdown
# 提取链接、图片、元数据
python3 scripts/fetch.py "https://example.com" --links --images --meta
# 仅运行安装
python3 scripts/fetch.py --setup
首次使用时自动执行:
典型工作流:
text
panscrapling-web-scraper/
├── SKILL.md # 本文档
├── scripts/
│ ├── setup.py # 自动安装脚本
│ └── fetch.py # 主抓取脚本
├── wheels/ # 嵌入的 Python 依赖包
│ ├── scrapling-*.whl
│ ├── playwright-*.whl
│ ├── patchright-*.whl
│ └── ... (其他依赖)
└── browsers/ # 浏览器(首次运行时下载)