1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-11-02 09:12:40 +01:00

[youtube:channel] Correct 404 handling

Previously, when we encountered a 404 - such as youtube-dl https://www.youtube.com/ohJeiboh8oorehai - we crashed with a regexp error. Instead, make sure to go on and eventually report a 404.
This commit is contained in:
Philipp Hagemeister 2015-09-14 00:32:20 +02:00
parent 287be8c615
commit 2b3c254678

View File

@ -1654,6 +1654,9 @@ def _real_extract(self, url):
channel_page = self._download_webpage( channel_page = self._download_webpage(
url + '?view=57', channel_id, url + '?view=57', channel_id,
'Downloading channel page', fatal=False) 'Downloading channel page', fatal=False)
if channel_page is False:
channel_playlist_id = False
else:
channel_playlist_id = self._html_search_meta( channel_playlist_id = self._html_search_meta(
'channelId', channel_page, 'channel id', default=None) 'channelId', channel_page, 'channel id', default=None)
if not channel_playlist_id: if not channel_playlist_id: