Install
openclaw skills install ai-news-pusherAI新闻自动获取与推送Skill v2.2。新增智能产品价值评分、高质量信源过滤、三级分类机制和人工反馈迭代。支持Tavily、Brave、RSS多新闻源聚合,无需API Key即可使用RSS源。当用户需要获取AI行业最新动态、自动化新闻推送、多源新闻聚合或智能内容过滤时触发此Skill。
openclaw skills install ai-news-pusherv2.2 全新升级:
本Skill提供AI新闻的自动获取和智能推送功能,支持多新闻源聚合和价值评分:
# 获取AI新闻(仅RSS源)
python3 scripts/fetch_ai_news.py --source rss --limit 10
# 设置OpenAI API Key(用于评分)
export OPENAI_API_KEY=your_api_key_here
# 获取新闻并启用评分
python3 scripts/fetch_ai_news.py --source all --limit 20 --enable-scoring
# 交互式审核待阅池内容
python3 scripts/news_manager.py review
# 查看统计数据
python3 scripts/news_manager.py stats
# 设置Feishu Webhook
export FEISHU_WEBHOOK_URL=https://open.feishu.cn/open-apis/bot/v2/hook/xxxxx
# 推送新闻
python3 scripts/push_to_feishu.py --limit 8
python3 scripts/fetch_ai_news.py [选项]
选项:
--limit N 返回N条新闻 (默认10)
--days N 搜索最近N天的新闻 (默认3)
--source SOURCE 新闻源: tavily|brave|rss|all (默认all)
--format FORMAT 输出格式: json|text|markdown (默认json)
--output FILE 输出到文件
--query QUERY 搜索关键词 (默认: AI artificial intelligence)
--enable-scoring 启用智能价值评分
--llm-provider LLM提供商: openai|anthropic (默认openai)
from scripts.news_sources import get_default_aggregator
# 获取聚合器(自动检测可用的API Key)
aggregator = get_default_aggregator(
include_tavily=True,
include_brave=True,
include_rss=True
)
# 获取新闻
news = aggregator.fetch_all(
query="AI artificial intelligence",
limit=10,
days=3
)
print(f"共获取 {len(news)} 条新闻")
from scripts.news_scorer import NewsScorer
from scripts.data_storage import DataStorage
# 初始化评分器
scorer = NewsScorer(llm_provider="openai")
# 批量评分
categorized = scorer.score_batch(news_list)
print(f"自动推送: {len(categorized['auto_push'])}")
print(f"待阅池: {len(categorized['gray_zone'])}")
print(f"已过滤: {len(categorized['filtered'])}")
# 保存到存储
storage = DataStorage()
storage.batch_save_gray_zone(categorized['gray_zone'])
storage.save_pushed(categorized['auto_push'])
storage.save_filtered(categorized['filtered'])
# 查看所有可用命令
python3 scripts/news_manager.py --help
# 常用命令
python3 scripts/news_manager.py review # 审核待阅池
python3 scripts/news_manager.py stats # 查看统计
python3 scripts/news_manager.py filtered # 查看被过滤内容
python3 scripts/news_manager.py feedback # 查看反馈记录
python3 scripts/news_manager.py analyze # 分析反馈数据
python3 scripts/news_manager.py config # 更新配置
python3 scripts/push_to_feishu.py [选项]
选项:
--limit N 推送新闻数量 (默认8)
--input FILE 从文件加载新闻(JSON格式)
--multi-source 使用多源聚合
--channel CHANNEL 推送渠道 (默认feishu)
--dry-run 仅格式化消息,不实际发送
--use-webhook 使用Webhook发送
# 创建每天9点推送任务
python3 scripts/schedule_push.py create --time "0 9 * * *" --limit 8
# 使用简写时间格式
python3 scripts/schedule_push.py create --time "09:00" --limit 10
# 测试推送
python3 scripts/schedule_push.py test --limit 5
# 列出所有任务
python3 scripts/schedule_push.py list
# 删除任务
python3 scripts/schedule_push.py delete --job-id <任务ID>
# Tavily API Key(可选,推荐)
export TAVILY_API_KEY=your_tavily_api_key
# Brave Search API Key(可选)
export BRAVE_API_KEY=your_brave_api_key
# OpenAI API Key(用于评分,推荐)
export OPENAI_API_KEY=your_openai_api_key
# 或使用 Anthropic
export ANTHROPIC_API_KEY=your_anthropic_api_key
# Feishu Webhook URL
export FEISHU_WEBHOOK_URL=https://open.feishu.cn/open-apis/bot/v2/hook/xxxxx
# OpenClaw Gateway地址
export OPENCLAW_GATEWAY_URL=http://localhost:8080
# ⚠️ OpenClaw Gateway令牌(敏感:仅在理解此功能时使用)
export OPENCLAW_GATEWAY_TOKEN=your_gateway_token
安装依赖:
# 核心依赖
pip install feedparser requests
# 完整依赖(推荐)
pip install tavily-python feedparser requests openai anthropic
时效性 (25%)
源头权重 (25%)
产业关联度 (25%)
信息增量 (25%)
TAVILY_API_KEY 是否正确设置--source rss 仅使用RSS源OPENAI_API_KEY 或 ANTHROPIC_API_KEY 是否设置FEISHU_WEBHOOK_URL 是否正确设置如果在使用过程中遇到问题,可以:
OPTIMIZATION_GUIDE.md 获取详细优化指南🎉 感谢使用 AI News Pusher v2.2!