diff options
author | Grzegorz P <[email protected]> | 2017-01-22 20:35:38 +0100 |
---|---|---|
committer | Sergey M <[email protected]> | 2017-01-23 02:35:38 +0700 |
commit | 8bc0800d7cf24b17204f0fb3c6e76327ed8d527f (patch) | |
tree | f1707f674222ccdd44648bea25619353439c341c /youtube_dl/extractor/youtube.py | |
parent | a089545e036619a798aa19f33085f2b0b87a1b0a (diff) | |
download | youtube-dl-8bc0800d7cf24b17204f0fb3c6e76327ed8d527f.tar.gz youtube-dl-8bc0800d7cf24b17204f0fb3c6e76327ed8d527f.zip |
[youtube:playlist] Fix nonexistent/private playlist detection (closes #11604)
Diffstat (limited to 'youtube_dl/extractor/youtube.py')
-rw-r--r-- | youtube_dl/extractor/youtube.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py index 63597dd16..644653357 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_id page = 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 private if re.match(r'[^<]*(The|This) playlist (does not exist|is private)[^<]*', match): |