logo
0
0
WeChat Login

Hotspot Monitor Skill for WorkBuddy

License: MIT Python 3.9+ WorkBuddy

一个用于 WorkBuddy 的热点监控 Skill,支持从多个平台抓取实时热点,根据自定义关键词筛选后,自动存入飞书多维表格并推送到移动端。

✨ 功能特性

  • 🔥 多平台热点抓取:支持知乎、微博、B站、今日头条、百度等主流平台
  • 🎯 智能关键词筛选:支持普通词、必须词、排除词多种匹配方式
  • 📊 飞书多维表格集成:自动存储热点数据,便于后续分析
  • 📱 移动端消息推送:通过飞书机器人实时推送匹配的热点
  • 定时自动化:支持 WorkBuddy 定时任务,自动执行监控
  • 🔧 高度可配置:灵活配置监控主题、平台、推送方式

🚀 快速开始

1. 安装

# 克隆仓库 git clone https://github.com/YOUR_USERNAME/hotspot-monitor-skill.git cd hotspot-monitor-skill # 安装依赖 pip install -r requirements.txt

2. 配置

复制示例配置文件并修改:

cp config.example.yaml config.yaml

编辑 config.yaml,配置你的监控主题和飞书信息:

monitor: themes: - name: "AI人工智能" keywords: ["AI", "人工智能", "大模型", "ChatGPT", "Claude"] exclude_keywords: ["游戏"] - name: "科技数码" keywords: ["科技", "手机", "芯片", "华为", "苹果"] platforms: - zhihu - weibo - bilibili feishu: app_id: "your_feishu_app_id" app_secret: "your_feishu_app_secret" base: app_token: "your_base_token" table_id: "your_table_id" webhook: url: "your_webhook_url"

3. 运行

python3 hotspot_monitor.py

📋 支持的平台

平台ID平台名称状态
zhihu知乎热榜
weibo微博热搜
bilibiliB站热门
toutiao今日头条
baidu百度热搜
douyin抖音热榜
thepaper澎湃新闻
cls财联社
wallstreetcn华尔街见闻
tieba贴吧热榜

⚙️ 配置详解

监控主题配置

themes: - name: "主题名称" keywords: ["关键词1", "关键词2"] # 匹配任意一个 must_keywords: ["必须包含"] # 必须全部包含 exclude_keywords: ["排除词1", "排除词2"] # 不能包含

飞书配置

获取飞书应用凭证:

  1. 访问 飞书开放平台
  2. 创建企业自建应用
  3. 获取 App IDApp Secret
  4. 开通权限:bitable:appbitable:app:readonly
  5. 将应用添加到多维表格协作者

获取多维表格 Token:

  • 打开多维表格,从 URL 中复制 app_tokentable_id
  • 示例:https://my.feishu.cn/base/APP_TOKEN?table=TABLE_ID

获取飞书机器人 Webhook:

  • 在飞书群设置中添加自定义机器人
  • 复制 Webhook 地址

🔗 与 WorkBuddy 集成

手动触发

在 WorkBuddy 中直接运行:

cd /path/to/hotspot-monitor-skill python3 hotspot_monitor.py

定时自动化

创建 WorkBuddy 自动化任务,设置定时执行:

# automation.yaml name: 热点监控 prompt: | 执行热点监控脚本: 1. cd /path/to/hotspot-monitor-skill 2. python3 hotspot_monitor.py schedule: "0 */2 * * *" # 每2小时执行一次

🛠️ 开发

项目结构

hotspot-monitor-skill/ ├── README.md # 项目说明 ├── LICENSE # 开源协议 ├── requirements.txt # Python依赖 ├── config.example.yaml # 配置示例 ├── config.yaml # 实际配置(gitignore) ├── hotspot_monitor.py # 主程序入口 ├── fetcher.py # 热点抓取模块 ├── feishu_integration.py # 飞书集成模块 └── docs/ # 文档目录 ├── CONFIG.md # 配置指南 └── API.md # API文档

本地开发

# 创建虚拟环境 python3 -m venv venv source venv/bin/activate # 安装开发依赖 pip install -r requirements-dev.txt # 运行测试 python3 -m pytest tests/

🤝 贡献

欢迎提交 Issue 和 Pull Request!

  1. Fork 本仓库
  2. 创建你的特性分支 (git checkout -b feature/AmazingFeature)
  3. 提交更改 (git commit -m 'Add some AmazingFeature')
  4. 推送到分支 (git push origin feature/AmazingFeature)
  5. 打开 Pull Request

📄 开源协议

本项目基于 MIT 协议开源。

🙏 致谢

📮 联系

如有问题或建议,欢迎通过以下方式联系:


如果这个项目对你有帮助,请给个 ⭐ Star 支持!

About

[省 Token]热点监控 Skill for WorkBuddy - 多平台热点抓取与飞书集成 https://github.com/jiangxu1024/hotspot-monitor-skill.git

48.00 KiB
0 forks0 stars1 branches1 TagREADMEMIT license
Language
Python100%