360 Secure SkillHub
360 安全技能中心

YouTube Transcript Fetcher

通过命令行抓取 YouTube 视频字幕并输出完整转写文本:支持单个视频 URL、频道近期视频加时间范围参数,以及基于 JSON 配置的批量/每日模式。实现上先用观看页抓取,再用 InnerTube 播放器 API 多客户端画像回退,以恢复仅存在自动生成字幕的情况。该 Skill 刻意保持 transcript-first,不做摘要。

分类:数据
ioridev
ioridev
热度 39.16
最近更新 2026-05-11 17:41:32

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add ioridev/youtube-transcript-fetcher
兼容性
通用兼容
联网要求
需要联网
数据出网
必须出网
Metadata
name
youtube-transcript-fetcher
description
Fetch full YouTube transcripts with robust InnerTube fallback. Use when extracting captions/transcripts from a YouTube URL, channel, or batch config, especially when normal transcript tools fail, uploader subtitles are missing, or YouTube auto-generated captions may still be recoverable.
metadata
{"openclaw":{"requires":{"bins":["python3","yt-dlp"]},"install":[{"id":"apt-yt-dlp","kind":"apt","package":"yt-dlp","bins":["yt-dlp"],"label":"Install yt-dlp (apt)"},{"id":"brew-yt-dlp","kind":"brew","formula":"yt-dlp","bins":["yt-dlp"],"label":"Install yt-dlp (brew)"}]}}

Fetch transcripts from YouTube videos. Prefer this skill when the goal is to obtain source transcript text, not to summarize.

Run ./youtube-transcript-fetcher --url <youtube-url> for a single video. Run ./youtube-transcript-fetcher --channel <channel-id-or-handle> --hours <n> for recent channel videos. Run ./youtube-transcript-fetcher --config config/channels.example.json --daily for batch mode.

The main script is scripts/youtube_transcript_fetcher.py. It uses watch-page scraping plus InnerTube player API fallback with multiple client profiles (ANDROID, WEB, TVHTML5_SIMPLY_EMBEDDED_PLAYER, IOS) to recover caption tracks that simpler methods miss, including cases where only YouTube auto-generated captions are available.

Install Python dependencies with pip install -r requirements.txt before first use.

Return the transcript text from the generated JSON output. Do not rely on summary fields because this skill is intentionally transcript-first.