基础版网页抓取工具,快速高效,适合大多数场景。
bash
# 基础抓取
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爬虫核心框架html2textHTML 转 Markdownplaywright浏览器自动化(stealth 模式)
特性基础版专业版抓取模式basic / stealthbasic / stealth / auto选择器数量11 个16 个微信公众号⚠️ 有限支持✅ 完整支持噪音清理❌✅ 微信专用清理自动检测❌✅ 智能模式选择
版本: 1.0.0
作者: OpenClaw