SuperAPI AI 工具集

content-source-aggregator

写作与研究

查看项目

更新于 10-15 10:21

技能介绍

用途

内容源热点采集器用于统一采集多个平台的热门内容,输出标准化热点池,作为内容创作流水线的 Phase 1(热点采集)环节,供后续 research agent 做选题评分。

主要能力

支持从 6 大平台免费采集热门内容,输出标准化 JSON 热点池。

支持平台及方式:

  • X/Twitter:syndication API(无需认证),免费额度无限,状态可用。
  • YouTube:RSS Feed(频道级)+ yt-dlp,免费额度无限,状态可用。
  • B站:公开 API(ranking/v2),免费额度无限,状态可用。
  • GitHub:Search API(无认证),免费额度 60次/小时,状态可用。
  • Reddit:PullPush API,免费额度无限,状态可用。
  • 抖音:热搜 API(无需认证),免费额度无限,状态可用。
  • LinuxDo:Discourse JSON API,免费额度无限,状态需登录态。
  • 小红书:Web 端 SSR 解析,免费额度无限,状态需登录态。
  • 微信公众号:搜狗微信搜索,免费额度有限,状态需登录态。
  • 微信视频号:无公开 API,状态需 Playwright。

使用方式

采集所有平台:

python3 ~/clawd/skills/content-source-aggregator/scripts/fetch_all.py

采集单个平台:

python3 ~/clawd/skills/content-source-aggregator/scripts/fetch_all.py --source twitter
python3 ~/clawd/skills/content-source-aggregator/scripts/fetch_all.py --source youtube
python3 ~/clawd/skills/content-source-aggregator/scripts/fetch_all.py --source bilibili
python3 ~/clawd/skills/content-source-aggregator/scripts/fetch_all.py --source github
python3 ~/clawd/skills/content-source-aggregator/scripts/fetch_all.py --source reddit
python3 ~/clawd/skills/content-source-aggregator/scripts/fetch_all.py --source linuxdo

输出:标准化 JSON 写入 ~/clawd/workspace/content-pipeline/hotpool/YYYY-MM-DD.json。

输出结构示例:

{
  "date": "2026-02-19",
  "fetched_at": "2026-02-19T10:00:00+08:00",
  "items": [
    {
      "source": "reddit",
      "title": "...",
      "url": "...",
      "summary": "...",
      "heat_score": 85,
      "category": "AI/Tech",
      "engagement": {"upvotes": 1200, "comments": 340},
      "fetched_at": "..."
    }
  ]
}

各平台 API 详情

X/Twitter:

  • 端点:https://syndication.twitter.com/srv/timeline-profile/screen-name/{username}
  • 方式:解析返回 HTML 中的推文文本
  • 可配置关注的账号列表

YouTube:

  • 端点:https://www.youtube.com/feeds/videos.xml?channel_id={id}
  • 方式:RSS XML 解析
  • 可配置关注的频道列表
  • 备选:yt-dlp 获取 trending

B站:

  • 热门排行:https://api.bilibili.com/x/web-interface/ranking/v2?rid=0&type=all
  • 热搜:https://api.bilibili.com/x/web-interface/wbi/search/square?limit=10
  • 需要 Referer:https://www.bilibili.com

GitHub:

  • 端点:https://api.github.com/search/repositories?q=stars:>100+pushed:>{date}&sort=stars
  • 无认证 60 次/小时,够用

Reddit:

  • 端点:https://api.pullpush.io/reddit/search/submission/?subreddit={sub}&sort=score&sort_type=desc&size=10
  • 免费无限制

LinuxDo:

  • 端点:https://linux.do/latest.json?order=default
  • Discourse 标准 API,免费公开

配置

编辑 scripts/config.json 自定义关注的账号/频道/子版块。

适用场景

适用于内容创作流水线中的热点采集环节,为后续选题评分和内容创作提供标准化热点数据。

限制

  • GitHub Search API 无认证时限制 60 次/小时。
  • LinuxDo、小红书、微信公众号需要登录态。
  • 微信视频号无公开 API,需要 Playwright。
  • 微信公众号通过搜狗微信搜索,免费额度有限。