Install
openclaw skills install wechat-article-parser-local解析微信公众号文章,提取标题、作者、正文内容、图片等信息。当用户发送微信公众号链接(mp.weixin.qq.com)并希望获取文章内容、摘要或保存时触发。支持自动提取内容并可选保存到飞书表格。
openclaw skills install wechat-article-parser-local解析微信公众号文章,自动提取标题、作者、发布时间、正文内容等信息。
python3 scripts/wechat_parser.py "https://mp.weixin.qq.com/s/xxxxx"
输出示例:
================================================================================
📰 标题: 文章标题
✍️ 作者: 公众号名称
🕐 发布时间: 2026-03-10
📊 字数: 3500
🖼️ 图片数: 5
================================================================================
📝 正文内容:
这是文章的正文内容...
================================================================================
# 保存为 JSON(包含全部信息)
python3 scripts/wechat_parser.py "URL" --save
# 指定输出文件名
python3 scripts/wechat_parser.py "URL" --save --output article.json
python3 scripts/save_to_feishu.py "https://mp.weixin.qq.com/s/xxxxx"
# 手动指定标题
python3 scripts/save_to_feishu.py "https://mp.weixin.qq.com/s/xxxxx" "自定义标题"
直接发送微信公众号链接,AI 会自动调用此 skill 解析内容:
https://mp.weixin.qq.com/s/xxxxx
或带指令:
解析这篇文章 https://mp.weixin.qq.com/s/xxxxx
收藏 https://mp.weixin.qq.com/s/xxxxx
{
"title": "文章标题",
"author": "公众号名称",
"publish_time": "2026-03-10",
"content": "正文内容...",
"word_count": 3500,
"images_count": 5,
"images": ["url1", "url2", ...],
"url": "原始链接",
"parsed_at": "2026-03-10 12:00:00"
}
如需使用飞书保存功能,需配置 .env 文件:
FEISHU_APP_ID=your_app_id
FEISHU_APP_SECRET=your_app_secret
FEISHU_APP_TOKEN=your_bitable_app_token
FEISHU_TABLE_ID=your_table_id
https://mp.weixin.qq.com/s/xxxxxhttps://mp.weixin.qq.com/s?__biz=xxx&mid=xxx&idx=xxxQ: 提取内容不完整? A: 微信有反爬机制,部分文章可能提取不完整。建议:
Q: 图片无法显示? A: 微信图片有防盗链机制,需要带 Referer 头访问。
wechat-article-parser/
├── SKILL.md # 本文档
├── scripts/
│ ├── wechat_parser.py # 核心解析脚本
│ └── save_to_feishu.py # 飞书保存脚本
├── .env.example # 配置模板
└── requirements.txt # 依赖
requests
beautifulsoup4
python-dotenv
安装:
pip3 install requests beautifulsoup4 python-dotenv
MIT License