Skip to content

Commit

Permalink
[YouTube] Avoid early crash if webpage can't be read
Browse files Browse the repository at this point in the history
* see issue ytdl-org#33013
  • Loading branch information
dirkf authored and susered committed Jan 5, 2025
1 parent 89d1e54 commit 152cfe7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion youtube_dl/extractor/youtube.py
Original file line number Diff line number Diff line change
Expand Up @@ -1951,7 +1951,7 @@ def _real_extract(self, url):
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
Expand Down

0 comments on commit 152cfe7

Please sign in to comment.