Skip to content

Instantly share code, notes, and snippets.

@esmaeelE
Created December 31, 2025 09:49
Show Gist options
  • Select an option

  • Save esmaeelE/b5dff227c6ec49e060d0695f64ec7bae to your computer and use it in GitHub Desktop.

Select an option

Save esmaeelE/b5dff227c6ec49e060d0695f64ec7bae to your computer and use it in GitHub Desktop.
Youtube download

Download from YouTube

This guide uses yt-dlp (a maintained fork of youtube-dl) and browser cookies for authenticated downloads.

Requirements

Setup

  1. Install yt-dlp
  2. Use the ExportCookies extension to export cookies from youtube.com
  3. Save the cookies file as cookies-youtube-com.txt

Usage

Download subtitles (auto-generated, converted to SRT)

yt-dlp --write-auto-sub --convert-subs srt --skip-download URL --cookies cookies-youtube-com.txt

Download video

yt-dlp URL --cookies cookies-youtube-com.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment