← 返回
内容创作 中文

Extract Youtube Transcript

Extract plain-text transcripts from YouTube videos using a local Python script. Use when the user wants to fetch, extract, or get a transcript from a YouTube...
使用本地 Python 脚本从 YouTube 视频提取纯文本字幕,适用于需要获取、提取或下载 YouTube 字幕的场景。
hushenglang
内容创作 clawhub v2.1.0 1 版本 99774.6 Key: 无需
★ 0
Stars
📥 1,771
下载
💾 0
安装
1
版本
#latest

概述

Extract YouTube Transcript

Fetches plain-text transcripts from YouTube videos using extract_youtube_transcript.py in this skill folder.

Dependency

pip show youtube-transcript-api &>/dev/null || pip install youtube-transcript-api

Quick Start

python extract_youtube_transcript.py "https://www.youtube.com/watch?v=VIDEO_ID"

Supported URL formats: youtube.com/watch?v=, youtu.be/, /embed/, /live/, /shorts/, or a raw 11-char video ID.

Common Patterns

Fetch with preferred language(s)

python extract_youtube_transcript.py "URL" --lang zh-Hant en

Pass languages in priority order. Falls back to any available transcript if none match.

Save transcript to file

python extract_youtube_transcript.py "URL" --output transcript.txt

Text is printed to stdout and also written to the file.

List available languages first

python extract_youtube_transcript.py "URL" --list-langs

Use this to discover what language codes are available before fetching.

Language Codes

CodeLanguage
----------------
enEnglish
zh-HantTraditional Chinese
zh-HansSimplified Chinese
jaJapanese
koKorean
esSpanish

Error Handling

ErrorCauseRecovery
------------------------
TranscriptsDisabledOwner disabled captionsNo transcript available
NoTranscriptFoundRequested lang not foundRun --list-langs, pick an available code
VideoUnavailableVideo is private/deletedVerify the URL
AgeRestrictedAge-gated videoAuth not supported; no workaround
InvalidVideoIdMalformed URL or IDCheck the URL format

Workflow

  1. Try a direct fetch first
  2. If NoTranscriptFound, run --list-langs to see available codes, then re-fetch with --lang
  3. Save long transcripts to a file with --output for easier downstream processing

版本历史

共 1 个版本

  • v2.1.0 当前
    2026-03-30 06:33 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

data-analysis

Perplexity Research

hushenglang
利用 Perplexity Agent API 进行深度研究,结合联网搜索、推理与多模型分析。适用于用户需要获取当前信息、市场动态等场景。
★ 0 📥 1,247
content-creation

AdMapix

fly0pants
广告情报与应用数据分析助手,支持搜索广告素材、分析应用排名、下载量、收入及市场洞察,用于广告素材和竞品分析。
★ 295 📥 136,456
content-creation

Baidu Wenku AIPPT

ide-rea
使用百度文库 AI 智能生成 PPT,自动根据内容选择模板。
★ 66 📥 46,167