Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Extract clean Markdown content from any URL using a three-tier strategy: Jina Reader, Scrapling, or web_fetch.
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
README.md
1<div align="center">23# Web Content Fetcher45**网页正文提取 · 永久免费 · 支持微信公众号**67[](https://www.python.org/)8[](LICENSE)910</div>1112---1314## 简介1516Web Content Fetcher 是一个轻量级的网页正文提取工具,能够自动将任意网页转换为干净的 Markdown 格式,保留标题、链接、图片和列表结构。1718**核心优势:**19- Scrapling 优先提取,内置 fast / stealth 双模式,自动降级20- Jina Reader 作为二级备选21- 完美支持微信公众号、掘金、CSDN 等国内平台22- 返回标准 Markdown 格式,便于后续处理23- 零配置,开箱即用2425---2627## 安装2829### 方式一:一键安装(推荐)3031访问 [skills.sh](https://skills.sh/shirenchuang/web-content-fetcher/web-content-fetcher) 页面,按提示一键安装。3233### 方式二:命令行安装3435```bash36npx skills add https://github.com/shirenchuang/web-content-fetcher --skill web-content-fetcher37```3839### 方式三:手动安装4041```bash42# Clone43git clone https://github.com/shirenchuang/web-content-fetcher.git4445# Copy to Claude Code skills directory46cp -r web-content-fetcher ~/.claude/skills/47```4849### 安装 Python 依赖5051```bash52pip install scrapling html2text53```5455> **注意**:在系统管理的 Python (macOS/Linux) 上,加 `--break-system-packages` 或使用 venv。5657---5859## 使用方式6061### 在 Claude Code 中使用6263直接告诉 AI 你要读取的 URL,会自动选择最佳方案:6465```66帮我读取这篇文章:https://mp.weixin.qq.com/s/EwVItQH4JUsONqv_Fmi4wQ67Extract the content from https://openai.com/blog/gpt-4o68```6970### 命令行单独使用7172```bash73# 基础用法(自动选择 fast 或 stealth 模式)74python3 scripts/fetch.py https://sspai.com/post/731457576# 强制 stealth 模式(用于 JS 渲染页面)77python3 scripts/fetch.py https://mp.weixin.qq.com/s/xxx --stealth7879# 限制输出字符数(默认 30000)80python3 scripts/fetch.py https://example.com/article 150008182# JSON 输出(含 url, mode, selector, content_length)83python3 scripts/fetch.py https://example.com --json8485# 输出到文件86python3 scripts/fetch.py https://example.com/article > output.md87```8889---9091## 提取策略9293```94URL 输入95│96▼97┌─────────────────────────────────────┐98│ 1. Scrapling(首选) │99│ · fast 模式:~1-3s,大部分网站 │100│ · stealth 模式:~5-15s,JS 渲染 │101│ · 内容太少时自动 fast → stealth │102└─────────────────────────────────────┘103│ 失败 / 未安装依赖104▼105┌─────────────────────────────────────┐106│ 2. Jina Reader(备选) │107│ · 速度快(~1-2s),格式干净 │108│ · 免费额度:200次/天 │109│ · 不支持:微信公众号、部分国内站 │110└─────────────────────────────────────┘111```112113### 域名路由114115| 域名 | 模式 | 说明 |116|------|------|------|117| `mp.weixin.qq.com` | `--stealth` | JS 渲染内容 |118| `zhuanlan.zhihu.com` | `--stealth` | 反爬 + JS |119| `juejin.cn` | `--stealth` | JS 渲染 SPA |120| `sspai.com` | fast | 静态 HTML |121| `blog.csdn.net` | fast | 静态 HTML |122| 其他 | fast | 自动降级 |123124---125126## 支持平台127128### 国内平台129130| 平台 | 模式 | 状态 | 说明 |131|------|------|:----:|------|132| 微信公众号 (mp.weixin.qq.com) | fast | ✅ | 正文完整提取 |133| 掘金 (juejin.cn) | stealth (auto) | ✅ | 自动降级到 stealth |134| CSDN (blog.csdn.net) | fast | ✅ | 正文精准提取 |135| 少数派 (sspai.com) | fast | ✅ | article 选择器命中 |136| 博客园 (cnblogs.com) | fast | ✅ | 文章列表和正文 |137| 知乎 (zhihu.com) | stealth | ✅ | 需有效 URL |138| 36氪 (36kr.com) | fast | ✅ | 需有效文章 URL |139| 今日头条 (toutiao.com) | stealth | ✅ | JS 渲染,需有效文章 URL |140| InfoQ 中文 (infoq.cn) | stealth (auto) | ✅ | 需有效文章 URL |141| 网易 (163.com) | fast | ✅ | 需有效文章 URL |142| 小红书 | - | ❌ | 需登录态 |143144### 海外平台145146| 平台 | 模式 | 状态 | 说明 |147|------|------|:----:|------|148| OpenAI Blog | fast | ✅ | article 选择器命中 |149| Google Blog | fast | ✅ | article 选择器命中 |150| Nature | fast | ✅ | 论文摘要完整 |151| arXiv | fast | ✅ | 标题/作者/摘要 |152| GitHub | fast | ✅ | README 完整提取 |153| Next.js Blog | fast | ✅ | article 选择器命中 |154| React Docs (react.dev) | fast | ✅ | 文档正文清晰 |155| MDN Web Docs | fast | ✅ | main 选择器命中 |156| Python Docs | fast | ✅ | 目录和正文 |157| Paul Graham Essays | fast | ✅ | 经典静态页 |158| 阮一峰博客 | fast | ✅ | 周刊完整提取 |159| Claude Code Docs | fast | ✅ | 文档正文 |160| Product Hunt | stealth | ⚠️ | Cloudflare 验证拦截 |161| more... | | | |162163---164165## 输出格式166167返回标准 Markdown,自动保留:168169- **标题层级**:`# ## ###`170- **超链接**:`[文字](url)`171- **图片**:``(data-src 懒加载自动处理)172- **列表、代码块、引用块**173174---175176## 相关项目177178### [Kuaifa(快发)](https://github.com/shirenchuang/kuaifa) — 公众号一键排版发布179180如果你需要将 Markdown 文章发布到微信公众号,推荐使用 **Kuaifa**:181182- 一键 Markdown 排版,支持多种主题183- 自动上传图片到 CDN184- 一键创建公众号草稿185- 支持预览和发布186187```bash188pip install kuaifa189kuaifa publish your-article.md190```191192---193194## 作者195196<div align="center">197198**石臻说AI**199200AI科技博主 · 10+年大厂AI提效专家201202专注于个人提效、超级个体、AI 资讯203204<img src="qrcode_for_shizhen.jpg" width="200" alt="公众号二维码"/>205206*扫码关注公众号*207208</div>209210---211212## License213214MIT215