如何开发RSS 新闻聚合
只保存标题、链接与时间,热榜 noindex,趋势专题才 index。
目标用户
每天回访看科技热点的开发者。
目标
- 多源 RSS
- 去重
- 趋势评分公开
不做
- 转载全文
- 把每条新闻做成 SEO 页
用户故事
- 打开 /hot 看今日列表
- 点击跳到原文
- 阅读 /trends 专题分析
页面与功能
页面:/hot、/hot/[category]、/trends、/trends/[slug]、/methodology
功能:来源适配器、canonical URL、聚类门槛
架构
Python worker 定时 fetch → normalize → dedupe → score → PostgreSQL。Web 只读。
数据库
news_sources, news_items(canonical_url unique), trend_topics, trend_snapshots
API
GET /api/hot(可缓存);管理端启停来源
安全
SSRF 黑名单;限制体大小;不把原文送进模型当指令。
测试
canonicalizeUrl 去 utm;titleSimilarity;trendScore 权重和为 1。
部署
worker 独立容器,mem_limit 128m。
任务
- 适配器
- 去重
- 热榜页 noindex
- 专题门槛
Codex 执行提示词
实现 RSS 适配器与热榜页。禁止保存正文。热榜 robots noindex。不要拷贝 TrendRadar。
