Install
openclaw skills install jt-daily-report获取每日日报,通过 API 获取用户新闻推荐信息,支持用户兴趣偏好和查询关键词排序,获取个性化每日日报,并生成精美 H5 页面。
openclaw skills install jt-daily-report此技能用于获取个性化每日日报,通过调用 API https://jiutian.10086.cn/jiujiuassist/proactive/get_user_news_recommend 获取新闻数据,并支持根据用户兴趣偏好和查询关键词进行个性化排序,最终生成精美的 H5 页面进行展示。
执行脚本 ./scripts/get_daily_report.py 获取新闻数据:
# 基本用法
python ./scripts/get_daily_report.py
重要:这一步由大模型直接完成,不需要编写 python 代码! 重要:这一步只需要输出新闻 ID 的顺序列表!
./data/daily_report.json文件./data/sorted_ids.json 文件中。如果 ./data/sorted_ids.json 文件已存在,请一定要先删除掉!!输出格式示例:
{
"sorted_ids": [103, 45, 67, 89, 12, 34, 56, 78, 90],
"sorting_reason": "根据你的画像(IT 爱好者、技术开发者、健身达人)优先展示:1) AI/科技新闻;2) 体育健康;3) 其他新闻"
}
排序要求:
执行脚本 ./scripts/generate_h5_report.py 将排序后的新闻数据转换为精美的 H5 页面。
./scripts/get_daily_report.py - 获取新闻数据的主脚本,支持接收用户偏好和查询参数./scripts/generate_h5_report.py - 生成精美 H5 页面的脚本当用户请求个性化日报时:
get_daily_report.py 获取原始新闻数据./data/sorted_ids.json 文件中
generate_h5_report.py 生成最终的 H5 页面# 获取默认日报
python ./scripts/get_daily_report.py
pip install requestsoutput/daily_report.html