With this code
import os
with open('urls.txt') as f:
for line in f:
os.system("youtube-dl "+"--write-thumbnail "+"--skip-download "+"--yes-playlist " +line)
The first image in the playlist downloads, then I get an error message saying 'list' is not recognized as an internal or ex ternal command, operable program or batch file. In 'urls.txt' I have just one url of a Youtube playlist. The url is this:
https://www.youtube.com/watch?v=GA3St3Rf9Gs&list=PL-uc0GihCvU9s24BT_mvTzt3zm7e2uDGm
It's cutting off input after the & symbol. If I replace 'list' in the url with 'foo' I get the same message. What do I do to make youtube-dl accept playlist URL?
You can use the
youtube_dl
library directly in your script and pass the urls to download from.