Reputation: 2479
I would like to download an entire playlist from Youtube but I would also like it NOT to download specific videos from the playlist. I know the link and the name of those videos in advance and can therefore give that information to youtube-dl
So far the best solution I have is downloading the playlist and then running a shell script that removes the unwanted videos. This is obviously very limited ( the video is downloaded each time I try to download the new videos added to the playlist )
Is it possible to ask youtube-dl to ignore specific videos directly by command line or by file ( that would contain the names or urls of the unwanted videos ) ?
Upvotes: 1
Views: 1741
Reputation: 630
Yes, you can do that by passing the following flags.
--playlist-start NUMBER Playlist video to start at (default is
1)
--playlist-end NUMBER Playlist video to end at (default is
last)
--playlist-items ITEM_SPEC Playlist video items to download.
Specify indices of the videos in the
playlist separated by commas like: "--
playlist-items 1,2,5,8" if you want to
download videos indexed 1, 2, 5, 8 in
the playlist. You can specify range: "
--playlist-items 1-3,7,10-13", it will
download the videos at index 1, 2, 3,
7, 10, 11, 12 and 13.
Upvotes: 3
Reputation: 101
Yes.
youtube-dl -ij --flat-playlist "your_playlist" | jq -r '"https://youtu.be/\(.id)"' > listurl.txt
grep -vf unwanted.txt listurl.txt > download.txt
youtube-dl -ia download.txt
Upvotes: 2