多平台社交媒体热点聚合工具,支持 X/Twitter、TikTok、Bilibili、YouTube、Instagram、微博、知乎、百度、抖音等平台。
- 🔄 每30分钟自动更新 - 通过 GitHub Actions 定时抓取
- 🌐 多平台支持 - 覆盖国内外主流社交媒体
- 📱 响应式设计 - 支持桌面和移动端
- 🆓 完全免费 - 使用 GitHub Pages 托管
- 🔓 开源 - 可自定义和扩展
| 平台 | 数据源 | 状态 |
|---|---|---|
| X (Twitter) | trends24.in | ✅ |
| TikTok | tokboard.com | ✅ |
| Bilibili | RSSHub | ✅ |
| YouTube | RSSHub | ✅ |
| top-hashtags.com | ✅ | |
| 微博 | RSSHub | ✅ |
| 知乎 | RSSHub | ✅ |
| 百度热搜 | 百度 API | ✅ |
| 抖音 | RSSHub | ✅ |
点击右上角 Fork 按钮
- 进入仓库 Settings → Pages
- Source 选择 "GitHub Actions"
- 进入仓库 Actions 页面
- 点击 "I understand my workflows, go ahead and enable them"
- 进入 Actions → "Fetch Trending Topics"
- 点击 "Run workflow"
几分钟后,访问 https://你的用户名.github.io/trending-hub/ 查看效果。
# 克隆仓库
git clone https://github.com/你的用户名/trending-hub.git
cd trending-hub
# 安装依赖
npm install
# 抓取数据
npm run fetch
# 构建 HTML
npm run build
# 本地预览
npm run devtrending-hub/
├── .github/
│ └── workflows/
│ └── fetch-trending.yml # GitHub Actions 工作流
├── scripts/
│ ├── fetch-trending.js # 数据抓取脚本
│ └── build-html.js # HTML 生成脚本
├── data/
│ └── trending.json # 抓取的热点数据
├── public/
│ └── index.html # 生成的网页
├── package.json
└── README.md
编辑 scripts/fetch-trending.js 中的 RSSHUB_INSTANCES 数组:
const RSSHUB_INSTANCES = [
'https://rsshub.app',
'https://你的自建实例.com',
];在 scripts/fetch-trending.js 中添加抓取函数,然后在 main() 函数中调用。
编辑 .github/workflows/fetch-trending.yml 中的 cron 表达式:
schedule:
- cron: '*/30 * * * *' # 每30分钟
# - cron: '0 * * * *' # 每小时
# - cron: '0 */2 * * *' # 每2小时抓取的数据存储在 data/trending.json,可通过以下 URL 访问:
https://你的用户名.github.io/trending-hub/data/trending.json
JSON 结构:
{
"lastUpdated": "2024-01-01T00:00:00.000Z",
"platforms": {
"twitter": {
"name": "X (Twitter)",
"icon": "𝕏",
"items": [
{
"rank": 1,
"title": "热门话题",
"url": "https://...",
"hot": "",
"platform": "twitter"
}
]
}
}
}- 请求频率限制 - 部分数据源可能有访问限制,建议使用自建 RSSHub 实例
- 数据准确性 - 热点数据来自第三方,可能存在延迟或不完整
- GitHub Actions 限制 - 免费账户每月有 2000 分钟限制
MIT License