Install
openclaw skills install @shuxiangfanclaw/scrapling-fetch-basic基础网页抓取工具,支持绕过反爬系统、自动定位正文区域、HTML 转 Markdown。适合抓取博客、新闻、公告等静态页面。
openclaw skills install @shuxiangfanclaw/scrapling-fetch-basic基础版网页抓取工具,快速高效,适合大多数场景。
# 基础抓取
python3 scripts/scrapling_fetch.py https://example.com/article
# 指定字符数
python3 scripts/scrapling_fetch.py https://example.com/article 50000
# 绕过反爬保护
python3 scripts/scrapling_fetch.py https://protected-site.com --mode stealth
# JSON 输出
python3 scripts/scrapling_fetch.py https://example.com --json
按优先级自动尝试:
article - HTML5 article 元素main - HTML5 main 主元素.post-content - 博客常见内容区域.article-content - 新闻常见内容区域.entry-content - WordPress 常见.post-body - 文章正文[class*='body'] - 包含 "body" 的类名[class*='content'] - 包含 "content" 的类名#content - content ID#main - main IDbody - 最后回退| 包名 | 用途 |
|---|---|
| scrapling | 爬虫核心框架 |
| html2text | HTML 转 Markdown |
| playwright | 浏览器自动化(stealth 模式) |
| 特性 | 基础版 | 专业版 |
|---|---|---|
| 抓取模式 | basic / stealth | basic / stealth / auto |
| 选择器数量 | 11 个 | 16 个 |
| 微信公众号 | ⚠️ 有限支持 | ✅ 完整支持 |
| 噪音清理 | ❌ | ✅ 微信专用清理 |
| 自动检测 | ❌ | ✅ 智能模式选择 |
版本: 1.0.0
作者: OpenClaw