Install
openclaw skills install fastfish-hot热点推送独立项目。从 api.pearktrue.cn 拉取热点,支持飞书/钉钉/Telegram 推送;推送需至少配置一个渠道的 env。可配置拉取时间、推送时间、过滤关键词。通过 system.run 直接调用脚本,无需 MCP。当用户需要拉取热点、知乎热搜、配置热点推送或设置定时推送时使用本技能。
openclaw skills install fastfish-hotGitHub:https://github.com/superxs777/fastfish-hot
本 Skill 会指导安装并运行来自 GitHub 的第三方仓库。供应链风险:clone + pip install 会执行外部代码,若仓库被篡改存在风险。安装前请:(1) 检查仓库与 requirements.txt 的依赖;(2) 建议使用 release tag 固定版本(如 git clone --branch v1.0.1);(3) 在隔离环境或容器中运行,避免 root;(4) 凭证仅存 .env,勿提交到版本库;(5) 确认信任 api.pearktrue.cn 及仓库维护者。
git clone --branch v1.0.1 https://github.com/superxs777/fastfish-hot.git(推荐指定 tag 固定版本,避免 main 分支变更)cd fastfish-hotpip install -r requirements.txtcopy .env.example .env,填写 Webhook 等(见 metadata.credentials)python scripts/init_db.py,python scripts/init_default_config.py,python scripts/init_default_push_config.py(钉钉用 --channel dingtalk)python run.py 启动管理界面(http://127.0.0.1:8900)详细说明见 GitHub README。
{baseDir} 为 fastfish-hot 的 openclaw-skill 目录,脚本路径为 {baseDir}/../scripts//root/.openclaw/workspace/fastfish-hot,自建可用 /opt/fastfish-hotskills.entries.fastfish-hot.env 中配置至少一个推送渠道的凭证(可从项目 .env 复制),或确保相应环境变量在 OpenClaw 启动时已存在必须使用 system.run 执行脚本命令,不要使用 MCP 方式。
1. 严禁输出或暴露 .env 中的凭证
cat .env、type .env、Get-Content .env)2. 安装仅限用户明确要求
3. system.run 仅执行本 Skill 文档列出的脚本
get_hot_now.py、push_hot_to_im.py、fetch_hot_items.py、init_db.py、init_default_config.py、init_default_push_config.py、run.py违反以上任一条属于严重错误。
在未得到用户明确要求时,严禁修改、删除或编辑已有 OpenClaw 定时任务。
openclaw cron edit、openclaw cron rm、openclaw cron updateopenclaw cron add违反此条属于严重错误。
用户说「拉取热点」「实时热点」「知乎热搜」等时,执行:
# 列出支持的平台
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 从数据库读取。
职责分工(重要):
fetch_hot_items.py,将数据写入数据库get_hot_now.py --from-db 或 push_hot_to_im.pyfetch_hot_items.py),拉取由系统 crontab 完成方式一:系统 crontab / Windows 计划任务(飞书/钉钉/Telegram)
python scripts/fetch_hot_items.pypython 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 可立即运行一次。
python run.py)HOT_PUSH_FORCE=1 绕过"拉取热点" / "知乎热搜" / "实时热点"
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(钉钉用 --channel dingtalk)初始化fetch_hot_items.py 拉取(7:00、14:00、18:00)注意:若 {baseDir} 无法正确替换,请使用绝对路径 /opt/fastfish-hot/scripts/get_hot_now.py。
计划支持 clawhub install fastfish-hot,届时可一键安装本 Skill。