360 Secure SkillHub
360 安全技能中心

YouTube Transcript

通过 Python 脚本按视频 ID 或 URL 抓取 YouTube 字幕,默认按 en、fr、de、es、it、pt、nl 顺序选取语言,也可指定语言代码。输出含 video_id、title、author、full_text 与带时间戳 transcript 数组的 JSON;脚本还涉及通过住宅 IP 代理或 WireGuard VPN 规避云端 IP 封锁。

分类:效率
xthezealot
xthezealot
热度 59.74
最近更新 2026-05-17 11:07:10

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add xthezealot/youtube-transcript
兼容性
通用兼容
联网要求
需要联网
数据出网
必须出网
Metadata
name
youtube-transcript
description
Fetch and summarize YouTube video transcripts. Use when asked to summarize, transcribe, or extract content from YouTube videos. Handles transcript fetching via residential IP proxy to bypass YouTube's cloud IP blocks.

YouTube Transcript

Fetch transcripts from YouTube videos and optionally summarize them.

Quick Start

python3 scripts/fetch_transcript.py <video_id_or_url> [languages]

Examples:

python3 scripts/fetch_transcript.py dQw4w9WgXcQ
python3 scripts/fetch_transcript.py "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
python3 scripts/fetch_transcript.py dQw4w9WgXcQ "fr,en,de"

Output: JSON with video_id, title, author, full_text, and timestamped transcript array.

Workflow

  1. Run fetch_transcript.py with video ID or URL
  2. Script checks VPN, brings it up if needed
  3. Returns JSON with full transcript text
  4. Summarize the full_text field as needed

Language Codes

Default priority: en, fr, de, es, it, pt, nl

Override with second argument: python3 scripts/fetch_transcript.py VIDEO_ID "ja,ko,zh"

Setup & Configuration

See references/SETUP.md for:

  • Python dependencies installation
  • WireGuard VPN configuration (required for cloud VPS)
  • Troubleshooting common errors
  • Alternative proxy options