From 176fc2cb003b7a74f5781a64a4e1ce32e740c149 Mon Sep 17 00:00:00 2001 From: dirkf Date: Tue, 31 Dec 2024 14:51:29 +0000 Subject: [PATCH] [YouTube] Avoid early crash if webpage can't be read * see issue #33013 --- youtube_dl/extractor/youtube.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py index 1f83acf7c..7ea30fd40 100644 --- 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