ea472c8bf839cf264dbc6335fccf630fe5bcdf63
- 13 个源清单及状态表 - 部署架构图更新(海外服务器已停用) - Pi 前置条件/操作命令/常见问题 Co-Authored-By: Claude <noreply@anthropic.com>
English Financial News
国际财经新闻私有化 Deep Research 平台。
核心能力
- M1 英文财经新闻抓取(Crawl4AI,headful Playwright + HTTP 代理,13 个源)
- M2 英文正文提取(trafilatura)
- M3 三层去重(URL Hash / 内容 Hash / SimHash 模糊)
- M4 全文英译中 + 投资事件抽取(LLM DeepSeek v4-flash)
- M5 向量生成(DashScope text-embedding-v3,1024 维)
- M6 双语向量知识库(Qdrant)
- M7 定时调度(06/12/18/22) + 每日 AI 摘要日报
- M8 MCP 服务(Cherry Studio / Claude Code Agent 深度研究)
部署架构
国内服务器(Pi 4, 8GB)
┌──────────────────────────────────────┐
│ M1 抓取(headful Playwright) │
│ HTTP 代理 → Privoxy → SOCKS5 │
│ ↓ │
│ M2 正文提取 → M3 去重 │
│ ↓ │
│ M4 翻译+事件抽取(DeepSeek) │
│ ↓ │
│ M5 向量生成 → M6 Qdrant 入库 │
│ ↓ │
│ 日报生成 → rsync 上传 doorcome.cn │
│ ↓ │
│ M8 MCP 服务(研究 Agent) │
└──────────────────────────────────────┘
海外服务器已于 2026-07-14 停用,全链路在 Pi 独立运行。
新闻源状态(2026-07-23)
| 源 | ID | 策略 | 日产量 | 状态 |
|---|---|---|---|---|
| Reuters | reuters |
Google News RSS | ~30 篇摘要 | ⚠️ DataDome |
| CNBC | cnbc |
CNBC RSS | ~25 篇 | ✅ |
| MarketWatch | marketwatch |
RSS + stealth | ~25 篇 | ✅ |
| Financial Times | ft |
FT RSS | ~20 篇摘要 | ⚠️ 付费墙 |
| Yahoo Finance | yahoo_finance |
Yahoo RSS | ~30 篇 | ✅ |
| Investing.com | investing |
Google News RSS + stealth | 25 篇摘要 | ✅ 2026-07-23 修复 |
| Seeking Alpha | seekingalpha |
RSS + stealth | ~20 篇 | ✅ |
| Barron's | barrons |
Dow Jones RSS + stealth | ~20 篇 | ✅ |
| WSJ | wsj |
Dow Jones RSS + stealth | ~20 篇 | ✅ |
| Economist | economist |
RSS + stealth | ~15 篇 | ✅ |
| InvestingLive | investinglive |
RSS(全文) | 25 篇 | ✅ 2026-07-23 新增 |
| ZeroHedge | zerohedge |
FeedBurner RSS | ~15 篇全文 | ✅ |
注: RSS 摘要源的全文通过 headful Playwright + HTTP 代理回退抓取。当前国内服务器使用 Shadowsocks + Privoxy 代理访问海外。
快速开始
环境要求
- Python 3.11
- uv
- Xvfb(Pi 服务器 headful 模式需要)
- Shadowsocks 客户端 + Privoxy(国内服务器海外代理)
安装
# 创建虚拟环境并安装依赖
uv sync
# 配置环境变量
cp .env.example .env
# 编辑 .env 填入真实 API Key(DeepSeek / DashScope / Qdrant)
Pi 服务器前置条件
# 1. Xvfb 虚拟显示器(headful Playwright 需要)
sudo apt install xvfb
Xvfb :99 -screen 0 1280x1024x24 -ac +extension RANDR &
# 2. Shadowsocks + Privoxy(HTTP 代理访问海外)
sudo apt install shadowsocks-libev privoxy
# 配置 /etc/shadowsocks-libev/config.json(服务端信息)
# 配置 /etc/privoxy/config(forward-socks5t 127.0.0.1:1088 .)
sudo systemctl enable --now shadowsocks-libev-local
sudo systemctl enable --now privoxy
操作命令
全流程自动化
# 全流程:M1 抓取 → M2→M6 管道 → 日报
# 每天 06:00 / 12:00 / 18:00 / 22:00 自动执行
bash scripts/domestic_full.sh
单步执行
# M1 抓取全部源(headful + HTTP 代理)
bash scripts/domestic_crawl_8g.sh
# M1 单源测试
bash scripts/domestic_crawl_8g.sh investing
bash scripts/domestic_crawl_8g.sh investinglive
# M2→M6 管道(需先有 raw 数据)
bash scripts/pipeline.sh
# 仅生成日报
uv run en-news report
调度查看
# 查看最近日志
tail -50 logs/full.log
# 查看日报
ls -lt data/reports/
配置说明
| 文件 | 用途 |
|---|---|
configs/sources.yaml |
英文财经新闻源定义(13 个源) |
configs/system.yaml |
系统级业务参数(超时/并发/LLM 模型等) |
configs/profiles/8g_headful.yaml |
Pi 服务器 headful 抓取配置(代理/超时) |
.env |
密钥 / 服务地址(不入 Git) |
prompts/ |
LLM Prompt 模板(翻译/日报/搜索 Agent) |
数据存储
data/
├── raw/{source_id}/{yyyymmdd}/ M1 原始抓取(HTML + Markdown)
├── processed/{source_id}/ M2 正文提取结果
├── dedup/ M3 去重指纹库(SQLite)
├── translations/{yyyymmdd}/ M4 翻译+事件抽取结果(JSONL)
├── embeddings/{yyyymmdd}/ M5 向量文件(JSONL)
├── reports/ M7 日报(HTML)
└── vectorstore/ M6 Qdrant 数据
Qdrant collection 名称:en_finance_news
MCP 服务
M8 模块提供 MCP(Model Context Protocol)服务,供 Cherry Studio / Claude Code 等客户端接入进行深度研究。
# 启动 MCP 服务
uv run en-news mcp-server
支持的工具:
| Tool | 功能 |
|---|---|
en_news_search |
语义搜索知识库 |
en_news_filter |
按源/日期/情绪筛选 |
en_news_trending |
获取热点事件 |
en_news_report |
获取最新日报 |
en_news_daily_brief |
一键生成简报 |
常见问题
为什么有些源只拿到摘要?
部分网站有强反爬(Cloudflare/DataDome/付费墙),RSS 只返回摘要。全文可尝试 headful 浏览器回退,但成功率取决于代理线路质量。
日报上传到哪里?
日报自动上传到 simon@doorcome.cn:/var/www/html/echart/research/,通过 HTTP 访问。
如何添加新源?
编辑 configs/sources.yaml,添加源配置(id/name/homepage/rss_url/article_url_pattern 等)。参考现有源格式。
项目计划
许可证
MIT
Languages
Python
93.6%
Shell
6.4%