安全扫描
OpenClaw
Error
静态分析:检测到 1 个模式
评估建议
这些模式可能指示有风险的行为。安装前,请检查上面的 VirusTotal 和 OpenClaw 结果进行上下文感知分析。详细分析 ▾
⚠ lib/article.py:178
检测到动态代码执行
安全有层次,运行前请审查代码。
运行时依赖
无特殊依赖
版本
latestv0.1.12026/3/10
初始发布:智能网页内容抓取器,用于文章和视频
● 可疑
安装命令 点击复制
官方npx clawhub@latest install web-fetcher
镜像加速npx clawhub@latest install web-fetcher --registry https://cn.clawhub-mirror.com
技能文档
智能网页抓取器
为 Claude Code 设计的智能网页内容抓取器。自动检测平台,使用最佳策略抓取文章或下载视频。
快速开始
# 抓取文章
python3 {SKILL_DIR}/fetcher.py "URL" -o ~/docs/
# 下载视频
python3 {SKILL_DIR}/fetcher.py "https://b23.tv/xxx" -o ~/videos/
# 批量抓取
python3 {SKILL_DIR}/fetcher.py --urls-file urls.txt -o ~/docs/
安装依赖
仅安装所需依赖 — 运行时检查依赖: | 依赖 | 目的 | 安装 | |-----------|---------|---------| | scrapling | 文章抓取(HTTP + 浏览器) |pip install scrapling |
| yt-dlp | 视频下载 | pip install yt-dlp |
| camoufox | 反检测浏览器(小红书、微博) | pip install camoufox && python3 -m camoufox fetch |
| html2text | HTML 转 Markdown | pip install html2text |智能路由
抓取器自动根据 URL 检测平台: | 平台 | 方法 | 备注 | |----------|--------|-------| | mp.weixin.qq.com | scrapling | 提取data-src 图像,处理 SVG 占位符 |
| .feishu.cn | 虚拟滚动 | 通过滚动收集所有块,使用 cookie 下载图像 |
| zhuanlan.zhihu.com | scrapling | .Post-RichText 选择器 |
| www.zhihu.com | scrapling | .RichContent 选择器 |
| www.toutiao.com | scrapling | 处理 toutiaoimg.com base64 占位符 |
| www.xiaohongshu.com | camoufox | 需要反 bot 保护的隐身浏览器 |
| www.weibo.com | camoufox | 需要反 bot 保护的隐身浏览器 |
| bilibili.com / b23.tv | yt-dlp | 支持质量选择的视频下载 |
| youtube.com / youtu.be | yt-dlp | 视频下载 |
| douyin.com | yt-dlp | 视频下载 |
| 未知 URL | scrapling | 泛型抓取,具有回退级别 |CLI 参考
python3 {SKILL_DIR}/fetcher.py [URL] [选项]
参数:
url URL 地址
选项:
-o, --output DIR 输出目录(默认:当前目录)
-q, --quality N 视频质量(如 1080, 720,默认:1080)
--method METHOD 强制方法:scrapling, camoufox, ytdlp, feishu
--selector CSS 强制 CSS 选择器用于内容提取
--urls-file FILE 包含 URL 的文件(每行一个,# 为注释)
--audio-only 提取音频(视频下载)
--no-images 跳过图像下载(文章)
--cookies-browser NAME 浏览器用于 cookie(如 chrome, firefox)
平台说明
微信 (mp.weixin.qq.com)
- 图像使用
data-src属性与mmbiz.qpic.cnURL - 可见
标签包含 SVG 占位符(懒加载) - 图像下载需要
Referer: https://mp.weixin.qq.com/头部 - Scrapling GET 通常有效,无需浏览器
飞书 (
.feishu.cn)- 使用虚拟滚动 — 内容块按需渲染
- 抓取器滚动整个文档,收集
[data-block-id]元素 - 图像需要认证抓取(cookie),通过浏览器的 fetch API 下载
- 可能显示 "无法打印" 文 件,但会自动清理
哔哩哔哩
- 短链接 (b23.tv) 自动解析
- 对于付费/会员内容,使用
--cookies-browser chrome - 默认质量为 1080p,通过
-q调整
故障排除
| 问题 | 解决方案 | |---------|----------| |scrapling not found | pip install scrapling |
| yt-dlp not found | pip install yt-dlp |
| 文章内容太短 | 对于 JS 密集的页面,尝试 --method camoufox |
| 飞书返回登录页 | 文档可能需要认证 |
| 哔哩哔哩 403 | 使用 --cookies-browser chrome |
| 图像下载失败 | 检查网络;微信图像需要 Referer 头部(自动处理) |手动使用
当 CLI 不适合您的需求时,直接使用模块:from lib.router import route, check_dependency
from lib.article import fetch_article
from lib.video import fetch_video
from lib.feishu import fetch_feishu# 路由 URL
r = route("https://mp.weixin.qq.com/s/xxx")
# {'type': 'article', 'method': 'scrapling', 'selector': '#js_content', 'post': 'wx_images'}
# 抓取文章
fetch_article(url, output_dir="/tmp/out", route_config=r)
# 下载视频
fetch_video(url, output_dir="/tmp/out", quality="720")
# 抓取飞书文档
fetch_feishu(url, output_dir="/tmp/out")
数据来源:ClawHub ↗ · 中文优化:龙虾技能库
OpenClaw 技能定制 / 插件定制 / 私有工作流定制
免费技能或插件可能存在安全风险,如需更匹配、更安全的方案,建议联系付费定制