1
0
mirror of https://github.com/l1ving/youtube-dl synced 2025-02-03 22:46:05 +08:00

[youtube:playlist] Fix 'this playlist doesn't exist/is private' error not working (#11604)

This commit is contained in:
Grzechooo 2017-01-08 01:24:06 +01:00
parent 827961b122
commit 7838764d7b

View File

@ -1955,7 +1955,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):