YouTube Closed Captions Capture — a CLI tool to download YouTube video transcripts (closed captions) as plain .txt files.
- Fetches captions via the YouTube Transcript API
- Saves the transcript as
<video_id>.txtin your chosen output directory - Graceful handling of missing or malformed input
poetry installpoetry run yt-cc-capture --video-id <VIDEO_ID> [--out-dir <OUTPUT_DIR>]--video-id(required): YouTube video ID (e.g.dQw4w9WgXcQ)--out-dir(optional): Output directory (defaults to./transcripts). Must already exist.
poetry run yt-cc-capture --video-id CH3ji8u3hfs --out-dir ./my_transcriptsyt-cc-capture/
├── pyproject.toml
├── README.md
└── src/
└── yt_cc_capture/
└── main.py
MIT © Eugene Odeluga