A feature-rich command-line audio/video downloader
[youtube:playlist] Fix nonexistent/private playlist detection (closes #11604)
Grzegorz P8bc0800d7cf2
diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.pyindex 63597dd166..6446533574 100644--- a/youtube_dl/extractor/youtube.py+++ b/youtube_dl/extractor/youtube.py@@ -1998,7 +1998,8 @@ class YoutubePlaylistIE(YoutubePlaylistBaseInfoExtractor):url = self._TEMPLATE_URL % playlist_idpage = self._download_webpage(url, playlist_id)- for match in re.findall(r'<div class="yt-alert-message">([^<]+)</div>', page):+ # the yt-alert-message now has tabindex attribute (see https://github.com/rg3/youtube-dl/issues/11604)+ for match in re.findall(r'<div class="yt-alert-message"[^>]*>([^<]+)</div>', page):match = match.strip()# Check if the playlist exists or is privateif re.match(r'[^<]*(The|This) playlist (does not exist|is private)[^<]*', match):