fastfish-hot-news-push 每日新闻热点推送(可设过滤词)
简介
fastfish-hot-news-push 每日新闻热点推送(可设过滤词)
原始描述
热点推送独立项目。从 api.pearktrue.cn 拉取热点,支持飞书/钉钉/Telegram 推送;推送需至少配置一个渠道的 env。可配置拉取时间、推送时间、过滤关键词。通过 system.run 直接调用脚本,无需 MCP。当用户需要拉取热点、知乎热搜、配置热点推送或设置定时推送时使用本技能。
通过你的 Agent 添加
安装目录:fastfish-hot/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
技能正文
name: fastfish-hot
description: "热点推送独立项目。从 api.pearktrue.cn 拉取热点,支持飞书/钉钉/Telegram 推送。可配置拉取时间、推送时间、过滤关键词。通过 system.run 直接调用脚本,无需 MCP。当用户需要拉取热点、知乎热搜、配置热点推送或设置定时推送时使用本技能。"
metadata:
{
"openclaw":
{
"requires": { "bins": ["python3"] }
}
}
fastfish-hot 能力说明
GitHub:https://github.com/superxs777/fastfish-hot
本 Skill 需配合 fastfish-hot 项目使用。请先安装 fastfish-hot,再在 OpenClaw 中启用本 Skill。
安装 fastfish-hot(首次使用必读)
- 克隆仓库:
git clone https://github.com/superxs777/fastfish-hot.git
- 进入目录:
cd fastfish-hot
- 安装依赖:
pip install -r requirements.txt
- 配置:
copy .env.example .env,填写 Webhook 等
- 初始化:
python scripts/init_db.py,python scripts/init_default_config.py,python scripts/init_default_push_config.py
- 可选:
python run.py 启动管理界面(http://127.0.0.1:8900)
git clone https://github.com/superxs777/fastfish-hot.gitcd fastfish-hotpip install -r requirements.txtcopy .env.example .env,填写 Webhook 等python scripts/init_db.py,python scripts/init_default_config.py,python scripts/init_default_push_config.pypython run.py 启动管理界面(http://127.0.0.1:8900)详细说明见 GitHub README。
前置要求
- fastfish-hot 已安装:按上方步骤完成部署
- Python 3.10+
- 命令路径:
{baseDir} 为 fastfish-hot 的 openclaw-skill 目录,脚本路径为 {baseDir}/../scripts/
- 若 baseDir 无法替换:使用绝对路径,如
python /opt/fastfish-hot/scripts/get_hot_now.py
使用方式
{baseDir} 为 fastfish-hot 的 openclaw-skill 目录,脚本路径为 {baseDir}/../scripts/python /opt/fastfish-hot/scripts/get_hot_now.py必须使用 system.run 执行脚本命令,不要使用 MCP 方式。
⚠️ 定时任务:严禁擅改(阻断式规则)
在未得到用户明确要求时,严禁修改、删除或编辑已有 OpenClaw 定时任务。
- 禁止:在定时任务出错、报错或用户未明确要求时,执行
openclaw cron edit、openclaw cron rm、openclaw cron update - 允许:用户明确说「修改」「删除」「调整」「取消」定时任务时,方可执行上述操作
- 允许:用户要求「添加」「创建」定时任务时,执行
openclaw cron add - 出错时:仅报告问题并给出建议,不得主动修改配置
违反此条属于严重错误。
可用能力
1. 实时拉取热点
用户说「拉取热点」「实时热点」「知乎热搜」等时,执行:
# 列出支持的平台
python {baseDir}/../scripts/get_hot_now.py --list-platforms
# 按平台拉取(逗号分隔)
python {baseDir}/../scripts/get_hot_now.py --source 知乎
python {baseDir}/../scripts/get_hot_now.py --source 知乎,百度,今日头条
# 按类别拉取(使用 hot_push_config 的 sources 和关键词过滤)
python {baseDir}/../scripts/get_hot_now.py --category emotion
# 从数据库读取(需先执行 fetch_hot_items.py,秒级完成,适合 OpenClaw Cron)
python {baseDir}/../scripts/get_hot_now.py --category emotion --from-db
# 输出 JSON
python {baseDir}/../scripts/get_hot_now.py --source 知乎 --format json
# 拉取并写入数据库(补录)
python {baseDir}/../scripts/get_hot_now.py --source 知乎 --save
参数:--source 平台名逗号分隔;--category 类别 code 如 emotion;--format text/json;--save 写入 hot_items_raw;--limit 每平台条数默认 20;--from-db 从数据库读取。
2. 定时更新(拉取 + 推送)
职责分工(重要):
- 拉取:仅由系统 crontab 执行
fetch_hot_items.py,将数据写入数据库 - 推送:OpenClaw Cron 仅执行
get_hot_now.py --from-db或push_hot_to_im.py - 禁止:不要在 OpenClaw 中创建或执行拉取任务(
fetch_hot_items.py),拉取由系统 crontab 完成
方式一:系统 crontab / Windows 计划任务(飞书/钉钉/Telegram)
- 拉取:7:00、14:00、18:00 执行
python scripts/fetch_hot_items.py - 推送:7:10、14:10、18:10 执行
python scripts/push_hot_to_im.py(.env 配置 Webhook)
方式二:OpenClaw Cron
飞书/钉钉/Telegram(通过脚本推送到 Webhook):
openclaw cron add --name "每日热点" --cron "0 8 * * *" --tz "Asia/Shanghai" --session isolated --message "cd /opt/fastfish-hot && python scripts/push_hot_to_im.py,将热点推送到配置的渠道"
Telegram(OpenClaw 已配置 Telegram 渠道,announce 直接推送):
# 拉取由系统 crontab 完成,OpenClaw 仅负责推送。该任务只执行 get_hot_now.py --from-db。
openclaw cron add --name "每日热点" --cron "10 7,14,18 * * *" --tz "Asia/Shanghai" --session isolated --message "cd /opt/fastfish-hot && python scripts/get_hot_now.py --category emotion --from-db,将输出作为今日热点简报发送" --channel telegram --to "你的ChatID"
立即测试:创建后执行 openclaw cron run <job-id> --force 可立即运行一次。
3. 配置管理
- 拉取/推送配置:访问管理界面 http://127.0.0.1:8900(需先
python run.py)
- 环境变量:在 .env 中配置 HOT_PUSH_FEISHU_WEBHOOK、HOT_PUSH_DINGTALK_WEBHOOK、HOT_PUSH_TELEGRAM_BOT_TOKEN、HOT_PUSH_TELEGRAM_CHAT_ID
使用示例
-
"拉取热点" / "知乎热搜" / "实时热点"
python {baseDir}/../scripts/get_hot_now.py --source 知乎
# 或按类别:python {baseDir}/../scripts/get_hot_now.py --category emotion
-
"如何设置每日热点推送"
- 执行
python scripts/init_default_config.py 和 python scripts/init_default_push_config.py 初始化配置
- 在 .env 中配置 Webhook 或 Telegram Token+ChatID
- 系统 crontab 配置
fetch_hot_items.py 拉取(7:00、14:00、18:00)
- 创建 OpenClaw Cron 推送任务(见上方示例)
python run.py)-
"拉取热点" / "知乎热搜" / "实时热点"
python {baseDir}/../scripts/get_hot_now.py --source 知乎 # 或按类别:python {baseDir}/../scripts/get_hot_now.py --category emotion -
"如何设置每日热点推送"
- 执行
python scripts/init_default_config.py和python scripts/init_default_push_config.py初始化配置 - 在 .env 中配置 Webhook 或 Telegram Token+ChatID
- 系统 crontab 配置
fetch_hot_items.py拉取(7:00、14:00、18:00) - 创建 OpenClaw Cron 推送任务(见上方示例)
- 执行
注意:若 {baseDir} 无法正确替换,请使用绝对路径 /opt/fastfish-hot/scripts/get_hot_now.py。
ClawHub 安装
计划支持 clawhub install fastfish-hot,届时可一键安装本 Skill。
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。