Documentation
README
WeChat Article Extractor
提取微信公众号文章内容为结构化 Markdown,保留表格、代码块、图片占位。
⚠️ 重要:禁止使用 WebFetch
WebFetch 对 mp.weixin.qq.com 会被企业安全策略拦截。必须使用本 skill 的 extract.js 脚本提取文章内容。
使用方法
从 URL 提取
node "<skill_dir>/extract.js" "https://mp.weixin.qq.com/s?__biz=...&mid=...&idx=...&sn=..."
其中 <skill_dir> 是本 skill 所在目录的绝对路径(即包含此 SKILL.md 的目录)。
从本地 HTML 文件提取
node "<skill_dir>/extract.js" --html /path/to/article.html [source_url]
输出格式
成功(退出码 0)
- stdout: Markdown 格式的文章正文(保留表格、代码块、图片占位)
- stderr: 一行 JSON 元数据:
{"title":"文章标题","author":"作者","account":"公众号名称","publishTime":"2024/01/15 10:30:00","url":"原始链接","type":"post","chars":12345}
失败(退出码非 0)
This is the opening of the README. Read the full README on GitHub.