mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-27 14:14:54 +01:00
[youtube] Correct signature extraction error detection
This commit is contained in:
parent
61989fb5e9
commit
c8bf86d50d
|
@ -865,7 +865,9 @@ def resfunc(args):
|
|||
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 @@ def _decrypt_signature(self, s, video_id, player_url, age_gate=False):
|
|||
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