Files
Agent-Reach/agent_reach/skill/references/video.md
T
Pnant 7015b08063 refactor: remove Douyin, Weibo and WeChat channels (#347)
All three had rotted past honest usability:
- Douyin's upstream (yzfly/douyin-mcp-server) is archived and required a
  4-step manual local-server setup nobody could complete
- Weibo depended on an unmaintained personal fork (mcp-server-weibo)
- WeChat full-article reading was increasingly blocked by anti-bot
  (#339) while doctor still advertised it as zero-config

Removes the channel files, installers, skill routing/trigger entries,
reference sections and README rows (zh+en). Honest counts: 13 platforms,
6 zero-config. They can return when maintained upstreams exist.

Follows the v1.4.0 precedent of removing Discord/Toutiao (#234).

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-10 15:57:05 +08:00

3.2 KiB
Raw Blame History

视频/播客

YouTube、B站、小宇宙播客的字幕和转录。

YouTube (yt-dlp)

获取视频元数据

yt-dlp --dump-json "URL"

下载字幕

# 下载字幕 (不下载视频)
yt-dlp --write-sub --write-auto-sub --sub-lang "zh-Hans,zh,en" --skip-download -o "/tmp/%(id)s" "URL"

# 然后读取 .vtt 文件
cat /tmp/VIDEO_ID.*.vtt

获取评论

# 提取评论(best-effort,不保证完整)
yt-dlp --write-comments --skip-download --write-info-json \
  --extractor-args "youtube:max_comments=20" \
  -o "/tmp/%(id)s" "URL"
# 评论在 .info.json 的 comments 字段中

搜索视频

yt-dlp --dump-json "ytsearch5:query"

字幕注意: 手动上传的字幕提取可靠;自动生成字幕可能存在行间重复,需后处理。 评论注意: --write-comments 基于网页抓取(非 YouTube Data API),部分评论可能丢失。

无字幕兜底:Whisper 音频转写

# 视频没有字幕时的兜底:下载音频并用 Whisper 转写(Groq 免费 key 即可)
agent-reach transcribe "https://www.youtube.com/watch?v=VIDEO_ID"
agent-reach transcribe ./local_audio.mp3 -o /tmp/transcript.txt

需要先配置 keyagent-reach configure groq-key gsk_xxx(免费,console.groq.comagent-reach configure openai-key sk-xxx。默认 auto 模式:groq 失败自动降级 openai。

B站 / Bilibili (yt-dlp + bili-cli)

视频元数据 (yt-dlp)

yt-dlp --dump-json "https://www.bilibili.com/video/BVxxx"

字幕 (yt-dlp)

yt-dlp --write-sub --write-auto-sub --sub-lang "zh-Hans,zh,en" --convert-subs vtt --skip-download -o "/tmp/%(id)s" "URL"

搜索/热门/排行 (bili-cli)

# 搜索视频
bili search "query" --type video -n 5

# 热门视频
bili hot -n 10

# 排行榜
bili rank -n 10

412 风控: 海外 IP 必须提供 Cookie--cookies-from-browser chrome--cookies /path/to/cookies.txt),国内 IP 一般不受影响。 安装 bili-cli: pipx install bilibili-cli,然后 bili login 扫码登录。

小宇宙播客 / Xiaoyuzhou Podcast

转录单集播客(可选 --polish 增强标点)

# 输出 Markdown 文件到 /tmp/。--polish 让 Llama 3.3 70B 给文稿补中文标点+合理分段
~/.agent-reach/tools/xiaoyuzhou/transcribe.sh --polish "https://www.xiaoyuzhoufm.com/episode/EPISODE_ID"

转写 prompt 已要求 Whisper 输出中文标点;若标点效果仍不理想,可加 --polish 用 Groq 上免费的 Llama 3.3 70B 补标点+合理分段(9 分钟播客约多 ~7 秒)。每次转写多一轮 LLM 调用,按需使用。

前置要求

  1. ffmpeg: brew install ffmpeg
  2. Groq API Key (免费): https://console.groq.com/keys
  3. 配置 Key: agent-reach configure groq-key YOUR_KEY
  4. 首次运行: agent-reach install --env=auto 安装工具

检查状态

agent-reach doctor

输出 Markdown 文件默认保存到 /tmp/

选择指南

场景 推荐工具
YouTube 字幕 yt-dlp
B站字幕 yt-dlp
播客转录 小宇宙 transcribe.sh
无字幕音视频 agent-reach transcribe