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 video URL, analyze YouTube video content as text, or needs subtitles/captions from a video.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "extract-youtube-transcript" with this command: npx skills add hushenglang/extract-youtube-transcript

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 <code>
  3. Save long transcripts to a file with --output for easier downstream processing

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

miaoda-app-chat-sync

Convert Git repository code to structured JSON instructions for AI agents. Fetches code from Git repositories (GitHub, GitLab, etc.), generates structured JS...

Registry SourceRecently Updated
Coding

Golang Modernize

Continuously modernize Golang code to use the latest language features, standard library improvements, and idiomatic patterns. Use this skill whenever writin...

Registry SourceRecently Updated
2040samber
Coding

Reliable Tool Context

Build reliable tool context from command output using artifacts and compact reproducible code queries.

Registry SourceRecently Updated
Coding

qwencloud-text

[QwenCloud] Generate text, have conversations, write code, reason, and call functions with Qwen models. TRIGGER when: user asks to chat with Qwen, generate t...

Registry SourceRecently Updated