logo

youtube-dl

[mirror] Download/Watch videos from video hostersgit clone https://hacktivis.me/git/mirror/youtube-dl.git
commit: 176fc2cb003b7a74f5781a64a4e1ce32e740c149
parent d55d1f423d6473ae6a9e13462d94bad1d71d28e0
Author: dirkf <fieldhouse@gmx.net>
Date:   Tue, 31 Dec 2024 14:51:29 +0000

[YouTube] Avoid early crash if webpage can't be read
* see issue #33013

Diffstat:

Myoutube_dl/extractor/youtube.py2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py @@ -1951,7 +1951,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor): pb_context = {'html5Preference': 'HTML5_PREF_WANTS'} player_url = self._extract_player_url(webpage) - ytcfg = self._extract_ytcfg(video_id, webpage) + ytcfg = self._extract_ytcfg(video_id, webpage or '') sts = self._extract_signature_timestamp(video_id, player_url, ytcfg) if sts: pb_context['signatureTimestamp'] = sts