mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-10 09:07:58 +01:00
[youtube:playlist] Fix nonexistent/private playlist detection (closes #11604)
This commit is contained in:
parent
a089545e03
commit
8bc0800d7c
1 changed files with 2 additions and 1 deletions
|
@ -1998,7 +1998,8 @@ def _extract_playlist(self, playlist_id):
|
|||
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):
|
||||
|
|
Loading…
Reference in a new issue