mirror of
https://codeberg.org/polarisfm/youtube-dl
synced 2024-11-23 00:54:31 +01:00
[youtube] Correct signature extraction error detection
This commit is contained in:
parent
61989fb5e9
commit
c8bf86d50d
@ -865,7 +865,9 @@ class YoutubeIE(YoutubeBaseInfoExtractor, SubtitlesInfoExtractor):
|
||||
def _decrypt_signature(self, s, video_id, player_url, age_gate=False):
|
||||
"""Turn the encrypted s field into a working signature"""
|
||||
|
||||
if player_url is not None:
|
||||
if player_url is None:
|
||||
raise ExtractorError(u'Cannot decrypt signature without player_url')
|
||||
|
||||
if player_url.startswith(u'//'):
|
||||
player_url = u'https:' + player_url
|
||||
try:
|
||||
@ -884,9 +886,6 @@ class YoutubeIE(YoutubeBaseInfoExtractor, SubtitlesInfoExtractor):
|
||||
raise ExtractorError(
|
||||
u'Automatic signature extraction failed: ' + tb, cause=e)
|
||||
|
||||
return self._static_decrypt_signature(
|
||||
s, video_id, player_url, age_gate)
|
||||
|
||||
def _get_available_subtitles(self, video_id, webpage):
|
||||
try:
|
||||
sub_list = self._download_webpage(
|
||||
|
Loading…
Reference in New Issue
Block a user