AINewsCollector/README.md
bojunc 954fe80fa7 fix: 修复 arXiv 和 HuggingFace 采集
- arXiv: 改用 curl 子进程支持代理,使用 lastUpdatedDate 排序 + 代码过滤 48 小时内论文
- HuggingFace: 修正 API 端点为 /api/daily_papers(下划线)
- 优化 HTTP 请求封装,稳定支持代理环境
2026-02-27 23:33:49 +08:00

79 lines
1.6 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# AI News Collector
自动采集AI相关新闻和趋势的工具。
## 功能
- 📡 多源采集arXiv、HuggingFace Papers、GitHub Trending
- 🔄 智能去重:避免重复内容
- 📊 权重排序:根据来源和关键词匹配度排序
- 📝 简报生成自动生成Markdown格式简报
## 配置
### 代理设置
工具支持HTTP/HTTPS代理用于访问国外数据源。
**方式1环境变量**
```bash
export HTTP_PROXY=http://127.0.0.1:7890
export HTTPS_PROXY=http://127.0.0.1:7890
```
**方式2修改代码**
`skill/ai-news-collector/collect.js` 中修改 `PROXY_HOST` 常量:
```javascript
const PROXY_HOST = 'http://127.0.0.1:7890';
```
### 数据源配置
编辑 `config.json` 文件:
```json
{
"topics": [...], // 主题关键词
"sources": {
"arxiv": { "enabled": true, ... },
"huggingface": { "enabled": true, ... },
"github": { "enabled": true, ... }
}
}
```
## 使用
### 手动采集
```bash
cd /Users/chenbj/home/workspace/OpenclawSpace/AINewsCollector
node skill/ai-news-collector/collect.js
```
### 定时采集
已配置cron job每天自动采集两次
- 09:00 - 每日推送
- 23:00 - 每日采集
## 输出
生成的简报保存在 `daily/` 目录:
- 文件名格式:`YYYY-MM-DD.md`
- 内容包括Top 10重要消息、分类汇总
## 故障排查
### 采集为0条
1. 检查网络连接
2. 确认代理配置正确
3. 查看错误日志输出
### 代理配置
如果访问HuggingFace或GitHub超时需要配置代理
- 代理地址:`http://127.0.0.1:7890`
- 支持HTTP和HTTPS协议
---
*更新时间: 2026-02-24*