aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordirkf <fieldhouse@gmx.net>2024-12-31 14:51:29 +0000
committerdirkf <fieldhouse@gmx.net>2024-12-31 14:51:29 +0000
commit176fc2cb003b7a74f5781a64a4e1ce32e740c149 (patch)
tree24d7892e3c55cb2518516f85d4fb5749f0b65ec3
parentd55d1f423d6473ae6a9e13462d94bad1d71d28e0 (diff)
[YouTube] Avoid early crash if webpage can't be read
* see issue #33013
-rw-r--r--youtube_dl/extractor/youtube.py2
1 files changed, 1 insertions, 1 deletions
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