微算力 · API 导航与自营网关
API 接入 EN
未登录登录
🕷️

一键抓取全网文章与视频

Web Fetcher · v0.1.1
入口已确认,内容待校验 文件树里有 SKILL.md,但正文还没采回,frontmatter 未核对。
效率 安全 B 级 作者 alexxxiong 公开目录收录
1.1k 下载 0 安装 2.4k 收藏 8 浏览

简介

智能多平台内容抓取工具,支持微信、飞书、知乎、B站等文章提取与视频下载,自动识别平台并选择最优策略。

原始描述

Smart web content fetcher - articles and videos from WeChat, Feishu, Bilibili, Zhihu, Toutiao, YouTube, etc. Triggers: '抓取文章', '下载网页', '保存文章', 'fetch URL', '...

通过你的 Agent 添加

安装目录:web-fetcher/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。

点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。

或者手动安装

Claude Code~/.claude/skills/web-fetcher/
Codex CLI~/.codex/skills/web-fetcher/
DeepSeek Harness~/.agents/skills/web-fetcher/

包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可; 目录名不用换,也不要把包直接解压到 skills 根目录。 技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。

中文使用说明 来自收录源

核心用法

Web Fetcher 是一款面向 Claude Code 的智能网页内容抓取工具,专为中文互联网生态设计。用户通过 CLI 或 Python API 调用,输入 URL 即可自动识别目标平台(微信文章、飞书文档、知乎专栏、B站视频等),并选择最优抓取策略:HTTP 请求、浏览器模拟或专用下载器。

主要功能模式:

  • 文章抓取:支持微信公众号、飞书文档、知乎、今日头条等,自动提取正文、转换 Markdown、下载图片
  • 视频下载:集成 yt-dlp,支持 Bilibili、YouTube、抖音等平台,可选画质与纯音频提取
  • 批量处理:通过 --urls-file 实现多链接批量抓取
  • 反检测浏览:针对小红书、微博等强反爬平台,使用 camoufox stealth 浏览器

技术亮点:

  • 智能路由系统自动匹配平台与抓取策略
  • 针对微信的 data-src 图片懒加载、飞书的虚拟滚动文档进行专项处理
  • 模块化设计,依赖按需安装,避免冗余

显著优点

  1. 平台覆盖全面:深度适配国内主流内容平台,而非通用爬虫
  2. 策略智能:根据 URL 自动选择 scrapling/camoufox/yt-dlp 最佳组合
  3. 输出友好:文章自动转为 Markdown,图片本地保存,便于后续处理
  4. 扩展灵活:支持强制指定方法、CSS 选择器、浏览器 Cookie 等高级参数

潜在局限

  • 维护依赖:平台反爬策略变化需持续更新适配规则
  • 认证内容限制:部分飞书文档、B站会员视频需登录 Cookie,工具本身不提供账号体系
  • 法律边界:抓取受版权保护内容(付费专栏、会员视频)存在合规风险
  • 稳定性差异:HTTP 抓取快但易被封;浏览器模拟稳定但资源消耗高

适合人群

  • 知识工作者:需要归档微信文章、飞书文档到本地知识库
  • 内容创作者:批量下载 B站/YouTube 素材进行二创分析
  • 研究人员:采集知乎、今日头条等平台的公开内容进行数据分析
  • 开发者:作为 Claude Code 技能集成到自动化工作流

常规风险

  • 账号封禁:高频抓取可能触发平台风控,导致 IP 或账号受限
  • 数据隐私:使用 --cookies-browser 会读取浏览器 Cookie,需注意本地数据安全
  • 内容合规:抓取他人原创内容需遵守平台 ToS 及著作权法
  • 依赖安全:yt-dlp、camoufox 等第三方工具需从可信渠道安装

技能正文


name: web-fetcher description: "Smart web content fetcher - articles and videos from WeChat, Feishu, Bilibili, Zhihu, Toutiao, YouTube, etc. Triggers: '抓取文章', '下载网页', '保存文章', 'fetch URL', '下载视频', '抓取飞书文档', '抓取微信文章', '把这个链接内容保存下来', '下载B站视频', 'download video', 'scrape article'." version: 0.1.1 license: Complete terms in LICENSE

Web Fetcher

Smart web content fetcher for Claude Code. Automatically detects platform and uses the best strategy to fetch articles or download videos.

Quick Start

# Fetch an article
python3 {SKILL_DIR}/fetcher.py "URL" -o ~/docs/

# Download a video
python3 {SKILL_DIR}/fetcher.py "https://b23.tv/xxx" -o ~/videos/

# Batch fetch from file
python3 {SKILL_DIR}/fetcher.py --urls-file urls.txt -o ~/docs/

Install Dependencies

Install only what you need — dependencies are checked at runtime:

Dependency Purpose Install
scrapling Article fetching (HTTP + browser) pip install scrapling
yt-dlp Video download pip install yt-dlp
camoufox Anti-detection browser (Xiaohongshu, Weibo) pip install camoufox && python3 -m camoufox fetch
html2text HTML to Markdown conversion pip install html2text

Smart Routing

The fetcher automatically detects the platform from the URL:

Platform Method Notes
mp.weixin.qq.com scrapling Extracts data-src images, handles SVG placeholders
*.feishu.cn Virtual scroll Collects all blocks via scrolling, downloads images with cookies
zhuanlan.zhihu.com scrapling .Post-RichText selector
www.zhihu.com scrapling .RichContent selector
www.toutiao.com scrapling Handles toutiaoimg.com base64 placeholders
www.xiaohongshu.com camoufox Anti-bot protection requires stealth browser
www.weibo.com camoufox Anti-bot protection requires stealth browser
bilibili.com / b23.tv yt-dlp Video download, supports quality selection
youtube.com / youtu.be yt-dlp Video download
douyin.com yt-dlp Video download
Unknown URLs scrapling Generic fetch with fallback tiers

CLI Reference

python3 {SKILL_DIR}/fetcher.py [URL] [OPTIONS]

Arguments:
  url                    URL to fetch

Options:
  -o, --output DIR       Output directory (default: current)
  -q, --quality N        Video quality, e.g. 1080, 720 (default: 1080)
  --method METHOD        Force method: scrapling, camoufox, ytdlp, feishu
  --selector CSS         Force CSS selector for content extraction
  --urls-file FILE       File with URLs (one per line, # for comments)
  --audio-only           Extract audio only (video downloads)
  --no-images            Skip image download (articles)
  --cookies-browser NAME Browser for cookies (e.g., chrome, firefox)

Platform Notes

WeChat (mp.weixin.qq.com)

  • Images use data-src attribute with mmbiz.qpic.cn URLs
  • Visible <img> tags contain SVG placeholders (lazy loading)
  • Image download requires Referer: https://mp.weixin.qq.com/ header
  • Scrapling GET usually works; no browser needed

Feishu (*.feishu.cn)

  • Uses virtual scroll — content blocks are rendered on-demand
  • The fetcher scrolls through the entire document, collecting [data-block-id] elements
  • Images require authenticated fetch (cookies), downloaded via browser's fetch API
  • May show "Unable to print" artifacts which are auto-cleaned

Bilibili

  • Short links (b23.tv) are auto-resolved
  • For premium/member content, use --cookies-browser chrome
  • Default quality is 1080p, adjustable with -q

Troubleshooting

Problem Solution
scrapling not found pip install scrapling
yt-dlp not found pip install yt-dlp
Article content too short Try --method camoufox for JS-heavy pages
Feishu returns login page The doc may require authentication
Bilibili 403 Use --cookies-browser chrome
Image download fails Check network; WeChat images need Referer header (auto-handled)

Manual Usage

When the CLI doesn't fit your needs, use the modules directly:

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

# Route a URL
r = route("https://mp.weixin.qq.com/s/xxx")
# {'type': 'article', 'method': 'scrapling', 'selector': '#js_content', 'post': 'wx_images'}

# Fetch article
fetch_article(url, output_dir="/tmp/out", route_config=r)

# Download video
fetch_video(url, output_dir="/tmp/out", quality="720")

# Fetch Feishu doc
fetch_feishu(url, output_dir="/tmp/out")

正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。

标签

web-scrapingcontent-archivalvideo-downloadmarkdownchinese-platformsknowledge-management

同类 Skill