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