Skip to content

Instantly share code, notes, and snippets.

@nipunsadvilkar
Last active April 3, 2017 11:33
Show Gist options
  • Save nipunsadvilkar/727abb288d5e9da0208d0cdeb5b8854a to your computer and use it in GitHub Desktop.
Save nipunsadvilkar/727abb288d5e9da0208d0cdeb5b8854a to your computer and use it in GitHub Desktop.
Data8 Fall 2016 youtube playlist download | Lecture 5 - 40

Data8 Fall 2016 youtube playlist download : Lecture 5 - 40:

youtube-dl --playlist-items 5-40 -o '%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s' https://www.youtube.com/playlist\?list\=PLFeJ2hV8Fyt7mjvwrDQ2QNYEYdtKSNA0y

When error occurs and you want to retry the download automatically, save following lines as youtube_download_retry.sh and run it using $./youtube_download_retry.sh. change the 100 times retry to desired range.

#!/usr/bin/env bash
function getvids() {
youtube-dl --playlist-items 19-40  -o '%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s' https://www.youtube.com/playlist\?list\=PLFeJ2hV8Fyt7mjvwrDQ2QNYEYdtKSNA0y
}
for i in {1..100}; do getvids && break || sleep 15; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment