微信公众号文章阅读器
读取并提取微信公众号文章标题、公众号名称及正文内容,支持移动端访问和自动重定向,适用于mp.weixin.qq.com链接。
Latest: v1.0.0
Initial release of WeChat Official Account Article Reader.
- Added weixin_reader.py for fetching and extracting WeChat article content via mp.weixin.qq.com links.
- Supports CLI usage: specify the article URL to read and output title, official account, and article content.
- Handles mobile WeChat User-Agent and follows redirects for better compatibility.
- Outputs in a clear text format with article metadata and body.
- Documents dependencies (httpx, beautifulsoup4) and usage instructions in SKILL.md.
weixin_reader
读取微信公众号文章内容。
触发条件
当用户提供微信公众号文章链接(mp.weixin.qq.com)并要求阅读、读取、查看文章内容时使用此 skill。
触发关键词:
- "读这篇微信文章"
- "看一下这个公众号文章"
- "帮我读取微信文章"
- 用户发送 mp.weixin.qq.com 链接
使用方法
python3 ~/.claude/skills/weixin_reader/weixin_reader.py "<微信文章URL>"
示例
python3 ~/.claude/skills/weixin_reader/weixin_reader.py "https://mp.weixin.qq.com/s?__biz=xxx&mid=xxx"
输出格式
标题: 文章标题
公众号: 公众号名称
--- 正文内容 ---
文章正文内容...
依赖
- httpx
- beautifulsoup4
如未安装,运行:
pip install httpx beautifulsoup4
注意事项
- 部分文章可能需要验证码,无法直接读取
- 使用移动端 User-Agent 模拟微信内置浏览器访问
- 支持自动跟随重定向
