Fetches video metadata and transcript from YouTube and writes a Markdown file: title, source link, full description, and timestamped transcript. No browser or API keys required.
- Python 3.8+
yt-dlp— metadata (title, description)youtube-transcript-api— transcript
pip install yt-dlp youtube-transcript-apipython yt_transcript_extractor.py <youtube_url>Examples:
# Full video
python yt_transcript_extractor.py "https://www.youtube.com/watch?v=VIDEO_ID"
# From a specific timestamp to end (supports t=123, t=1m30s, t=2m)
python yt_transcript_extractor.py "https://www.youtube.com/watch?v=VIDEO_ID&t=600"Output is saved as {video_title}.md in the current directory with:
- Source — link with start time (
&t=0or the timestamp from the URL) - Description — full video description (intro, bullets, links)
- Transcript — table of time (seconds) and text