This might be some new youtube API feature, but to get the desired result I had to add ''noplaylist': True,' to the ydl_opts, like:
ydl_opts = {
'format': 'bestaudio/best',
'outtmpl':'%(title)s', #name the file the ID of the video
'embedthumbnail': True,
'noplaylist': True,
'postprocessors': [{
'key': 'FFmpegExtractAudio',
'preferredcodec': 'mp3',
'preferredquality': '192',
}, {
'key': 'FFmpegMetadata',
}]
}
Without the noplaylist argument the routine will download entire youtube playlists for every song which results in way more songs than expected.
https://stackoverflow.com/questions/54924447/youtubedl-starts-downloading-the-whole-playlist-instead-of-just-one-video
This might be some new youtube API feature, but to get the desired result I had to add ''noplaylist': True,' to the ydl_opts, like:
ydl_opts = {
'format': 'bestaudio/best',
'outtmpl':'%(title)s', #name the file the ID of the video
'embedthumbnail': True,
'noplaylist': True,
'postprocessors': [{
'key': 'FFmpegExtractAudio',
'preferredcodec': 'mp3',
'preferredquality': '192',
}, {
'key': 'FFmpegMetadata',
}]
}
Without the noplaylist argument the routine will download entire youtube playlists for every song which results in way more songs than expected.
https://stackoverflow.com/questions/54924447/youtubedl-starts-downloading-the-whole-playlist-instead-of-just-one-video