Skip to content

Instantly share code, notes, and snippets.

@jamesdeantv
Forked from ZubairLK/youtube-playlist.txt
Created October 9, 2018 12:50
Show Gist options
  • Save jamesdeantv/5715bcc0781203c0ebb2a0d92944c9d0 to your computer and use it in GitHub Desktop.
Save jamesdeantv/5715bcc0781203c0ebb2a0d92944c9d0 to your computer and use it in GitHub Desktop.
Downloading all playlists of a user using youtube-dl khanacademy
youtube-dl is a nifty utility that can parse and download all user videos. Recently added a feature on downloading all playlists.
Here is a command that downloads all playlists of user KhanAcademyUrdu and puts all videos of each playlist in separate folders.
youtube-dl -ciw -f '(webm)[height<480]' -o '/media/zubairlk/part1/khanurdu/%(playlist)s/%(playlist_index)s_%(title)s_%(id)s.%(ext)s' --yes-playlist -R 10000 https://www.youtube.com/user/KhanAcademyUrdu/playlists
some explanation for later. see https://github.com/rg3/youtube-dl for full details.
-i is to ignore interrupts. timeouts/private videos etc block otherwise.
-f is because I want to download a specific webm format with 480p or less. Default is best quality I think.
-o is output file format. There is a default. But I wanted each subject in separate. Khan academy has put them in separate playlists so that makes it easy.
batchfile of video links is like this -a e.g
youtube-dl -a videos.txt -o '%(autonumber)s/%(playlist_index)s_%(title)s_%(id)s.%(ext)s' -v --get-filename
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment