Loading...
Loading...
Compare original and translation side by side
jsonnode scripts/toutiao.jsnode scripts/toutiao.js 10jsonnode scripts/toutiao.jsnode scripts/toutiao.js 10
获取热榜(JSON 格式,默认 50 条):
```bash
node scripts/toutiao.js jsonnode scripts/toutiao.js json 20
Get hot ranking (JSON format, default 50 entries):
```bash
node scripts/toutiao.js jsonnode scripts/toutiao.js json 20| 字段 | 类型 | 说明 |
|---|---|---|
| rank | number | 榜单排名(从 1 开始) |
| title | string | 热点标题 |
| popularity | number | 热度值(HotValue,已转为数字;解析失败时为 0) |
| link | string | 热点详情链接(已清理 query/hash) |
| cover | string | null | 封面图 URL(如有) |
| label | string | null | 标签/标识(如有) |
| clusterId | string | 聚合 ID(字符串化) |
| categories | string[] | 兴趣分类英文(如有) |
| categoriesCN | string[] | 兴趣分类中文(已自动映射) |
| Field | Type | Description |
|---|---|---|
| rank | number | Ranking on the list (starting from 1) |
| title | string | Hot title |
| popularity | number | HotValue (converted to number; 0 if parsing fails) |
| link | string | Hot detail link (query/hash has been cleaned) |
| cover | string | null | Cover image URL (if available) |
| label | string | null | Tag/identifier (if available) |
| clusterId | string | Aggregation ID (stringified) |
| categories | string[] | English interest categories (if available) |
| categoriesCN | string[] | Chinese interest categories (automatically mapped) |
financecartechnologyentertainmentsportssocietyinternationalfinancecartechnologyentertainmentsportssocietyinternationalundefinedundefined
**格式要求**:
- 标题使用加粗(**标题**)
- 热度以"万"为单位显示(如:4651万)
- 分类如有多个用"/"分隔,无分类显示"-"
- 链接使用尖括号包裹 `[查看详情](<链接>)`,避免特殊字符导致 Markdown 解析问题
- 每条新闻之间用 `---` 分隔
- 默认显示前10条热榜
**Format Requirements**:
- Titles are bolded (**title**)
- Popularity is displayed in units of "ten thousand" (e.g.: 4651 ten thousand)
- If there are multiple categories, separate them with "/", display "-" if there is no category
- Links are wrapped in angle brackets `[查看详情](<link>)` to avoid Markdown parsing problems caused by special characters
- Each news item is separated by `---`
- The first 10 hot ranking entries are displayed by default