Wechat Article Down
Description
微信公众号文章下载工具 | WeChat Article Downloader - Claude Code Skill,自动提取文章正文、图片、音频、视频,保存为本地 Markdown | Download WeChat MP articles to local Markdown with images
Installation
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open the source below and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
README
wechat-article-down
微信公众号文章下载工具 —— Claude Code Skill,通过浏览器自动提取文章内容,下载图片、音频、视频并保存为 Markdown。
功能
- 自动提取文章标题、作者、公众号、发布时间、摘要等元信息
- 下载正文中的图片(处理微信 CDN 防盗链)、音频、视频(支持 yt-dlp)
- HTML 转 Markdown,保留代码块、表格、列表等格式
- 支持批量处理多篇文章
依赖
- Node.js >= 16(无需 npm install,纯标准库实现)
- chrome-devtools MCP(必须,用于浏览器自动化)
- yt-dlp(可选,下载腾讯视频等):
brew install yt-dlp
项目结构
wechat-article-down/
├── SKILL.md # Claude Code Skill 定义(流程说明)
├── README.md
├── scripts/
│ ├── receiver.js # 本地 JSON 接收服务(端口 17329)
│ └── download_article.js # 文章内容下载与 Markdown 转换
└── references/
└── extract.js # 浏览器端提取脚本(注入页面执行)
工作流程
验证链接 → 启动接收服务 → 打开文章页面 → 等待加载 → 滚动触发懒加载 → 提取数据并 POST → 下载资源 → 生成 Markdown
- 验证链接:URL 必须以
https://mp.weixin.qq.com/开头 - 启动接收服务:
receiver.js监听 17329 端口,接收浏览器 POST 的文章数据 - 打开页面:通过 chrome-devtools MCP 导航到文章 URL
- 等待加载:执行
WAIT_SCRIPT确认正文#js_content已渲染 - 滚动触发懒加载:执行
SCROLL_SCRIPT,确保所有图片src从data-src替换为真实 CDN 地址 - 提取并发送数据:执行
SAVE_SCRIPT,在浏览器内提取完整 JSON 并 POST 到本地接收服务 - 下载资源:
download_article.js读取 JSON,批量下载图片/音频/视频 - 生成 Markdown:HTML 转 Markdown,替换资源链接为本地路径,输出
article.md
输出结构
downloads/
└── 文章标题/
├── article.md # Markdown 正文(含 YAML frontmatter)
├── images/
│ ├── img_001.jpg
│ ├── img_002.png
│ └── ...
├── audio/
│ └── audio_001.mp3
├── video/
│ └── video_001.mp4
└── failed.log # 下载失败的资源记录(如有)
安装
npx skills add https://github.com/zyw-Wayne/wechat-article-down
使用方式
作为 Claude Code Skill
安装后,直接向 Claude 发送微信文章链接即可触发下载:
下载这篇文章:https://mp.weixin.qq.com/s/xxxxx
触发关键词:`下载微信文章`、`保存公众号文章`、`下载这篇文章`、`wechat article download`
独立使用 download_article.js
# 从标准输入读取 JSON
echo '' | node scripts/download_article.js --stdin --output ./downloads
# 从文件读取
node scripts/download_article.js --stdin --output ./downloads < /tmp/wechat_a
Related Skills
Doc Co-authoring
Guide users through structured workflow for co-authoring documentation
Documentation Docx
Create, edit, and analyze Word documents with tracked changes, comments, and formatting
Documentation Extract text, create PDFs, merge/split documents, and handle forms
Documentation Pptx
Create, edit, and analyze PowerPoint presentations with layouts and templates
Documentation Xlsx
Create, edit, and analyze Excel spreadsheets with formulas, formatting, and visualization
Documentation mcp-server-fetch
Fetch and convert web pages to markdown.
Documentation