WeChat MP Monitor
Monitor WeChat public account articles and deliver notifications.
Features
- - Monitor specific WeChat public accounts for new articles
- Extract and summarize article content
- Send notifications to Feishu/Lark
- Schedule checks via cron
Quick Start
Monitor a single article
CODEBLOCK0
Add account to watchlist
CODEBLOCK1
Check all watched accounts
CODEBLOCK2
Setup
Feishu Webhook (Optional)
To receive Feishu notifications:
- 1. Create a Feishu group
- Add a webhook bot
- Copy the webhook URL
- Set environment variable:
CODEBLOCK3
Cron Schedule
Add to crontab for automatic monitoring:
CODEBLOCK4
Or use OpenClaw cron:
CODEBLOCK5
Commands
| Command | Description |
|---|
| INLINECODE0 | Summarize a single article |
| INLINECODE1 |
Add account to watchlist |
|
unwatch <name> | Remove from watchlist |
|
list | Show watched accounts |
|
check-all | Check all accounts for updates |
|
history | Show recently processed articles |
Data Storage
- - Watchlist: INLINECODE6
- Article history: INLINECODE7
Dependencies
- - Python 3.6+
- requests
- beautifulsoup4
Install: INLINECODE8
技能名称:wechat-mp-monitor
详细描述:
微信公众号监控
监控微信公众号文章并发送通知。
功能特性
- - 监控指定微信公众号的新文章
- 提取并总结文章内容
- 发送通知到飞书
- 通过定时任务安排检查
快速开始
监控单篇文章
bash
scripts/wechat_mp.py summary <文章链接>
添加公众号到监控列表
bash
scripts/wechat_mp.py watch <公众号名称> [--feishu-webhook <链接>]
检查所有已监控的公众号
bash
scripts/wechat_mp.py check-all
设置
飞书 Webhook(可选)
要接收飞书通知:
- 1. 创建一个飞书群组
- 添加一个 Webhook 机器人
- 复制 Webhook 链接
- 设置环境变量:
bash
export FEISHU_WEBHOOK=https://open.feishu.cn/open-apis/bot/v2/hook/...
定时任务
添加到 crontab 以实现自动监控:
bash
每小时检查一次
0
cd /path/to/workspace && python scripts/wechat_mp.py check-all
或使用 OpenClaw 定时任务:
bash
openclaw cron add --name wechat-monitor --schedule 0 --command python scripts/wechat_mp.py check-all
命令
| 命令 | 描述 |
|---|
| summary <链接> | 总结单篇文章 |
| watch <名称> |
添加公众号到监控列表 |
| unwatch <名称> | 从监控列表中移除 |
| list | 显示已监控的公众号 |
| check-all | 检查所有公众号的更新 |
| history | 显示最近处理过的文章 |
数据存储
- - 监控列表:~/.wechatmpmonitor/watchlist.json
- 文章历史:~/.wechatmpmonitor/history.json
依赖项
- - Python 3.6+
- requests
- beautifulsoup4
安装:pip install requests beautifulsoup4