CN Hot Trends — 中文+全球热榜聚合
Quick Start
CODEBLOCK0
Data Sources
| Source | ID | Content | Auth |
|---|
| 百度热榜 | INLINECODE0 | 实时热搜,7M+ 热度值 | No |
| 今日头条 |
toutiao | 头条热榜 | No |
| V2EX |
v2ex | 技术社区热帖 + 回复数 | No |
| Hacker News |
hn | 全球科技热帖 + 分数 | No |
| GitHub |
github | 近 7 天热门新项目 | No |
Usage
CODEBLOCK1
Options
| Flag | Default | Description |
|---|
| INLINECODE5 | INLINECODE6 | Comma-separated source IDs |
| INLINECODE7 |
10 | Items per source |
|
--format |
json | Output:
json,
text,
markdown |
|
--proxy | none | HTTP proxy URL |
Output Formats
- - json: Structured data, good for further processing
- text: Human-readable plain text
- markdown: Formatted tables, good for chat/email output
Tips
- - Baidu and Toutiao work without proxy; V2EX/HN/GitHub need proxy in some regions
- Combine with AI analysis: fetch trends → summarize → identify patterns
- Use
--sources github to discover trending open-source projects - Pair with cron for daily automated briefings
CN Hot Trends — 中文+全球热榜聚合
快速开始
bash
python3 scripts/fetch_trends.py --proxy http://127.0.0.1:7897 --format markdown
数据源
| 数据源 | ID | 内容 | 认证 |
|---|
| 百度热榜 | baidu | 实时热搜,700万+ 热度值 | 无需 |
| 今日头条 |
toutiao | 头条热榜 | 无需 |
| V2EX | v2ex | 技术社区热帖 + 回复数 | 无需 |
| Hacker News | hn | 全球科技热帖 + 分数 | 无需 |
| GitHub | github | 近7天热门新项目 | 无需 |
使用方法
bash
所有数据源,Markdown输出
python3 scripts/fetch_trends.py --format markdown
指定数据源,JSON输出
python3 scripts/fetch_trends.py --sources baidu,v2ex --format json --limit 5
使用代理(V2EX、HN、GitHub需要)
python3 scripts/fetch_trends.py --proxy http://127.0.0.1:7897
纯文本输出
python3 scripts/fetch_trends.py --format text --limit 10
选项
| 标志 | 默认值 | 描述 |
|---|
| --sources | baidu,toutiao,v2ex,hn,github | 以逗号分隔的数据源ID |
| --limit |
10 | 每个数据源的项目数 |
| --format | json | 输出格式:json、text、markdown |
| --proxy | 无 | HTTP代理URL |
输出格式
- - json:结构化数据,适合进一步处理
- text:人类可读的纯文本
- markdown:格式化表格,适合聊天/邮件输出
使用技巧
- - 百度与头条无需代理即可使用;部分地区访问V2EX/HN/GitHub需要代理
- 结合AI分析:获取趋势 → 总结 → 识别模式
- 使用 --sources github 发现热门开源项目
- 配合cron定时任务,实现每日自动化简报