* fixes crash if signature decryption code isn't packed with artifacts

merge-requests/5/head v2021.06.24.1
Dominika Liberda 2021-06-24 13:58:36 +02:00
parent a0cb1b40a2
commit 31b7bf5bdb
2 changed files with 5 additions and 4 deletions

View File

@ -1025,9 +1025,10 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
return a
def _full_signature_handling(self, sig, player_url, video_id):
signature = _decrypt_signature_protected(sig)
if re.match(self._VALID_SIG_VALUE_RE, signature):
return signature
if _decrypt_signature_protected:
signature = _decrypt_signature_protected(sig)
if re.match(self._VALID_SIG_VALUE_RE, signature):
return signature
if self._downloader.params.get('verbose'):
self.to_screen("Built-in signature decryption failed, trying dynamic")
sig_decrypt_stack = self._extract_signature_function(video_id, player_url)

View File

@ -115,7 +115,7 @@ setup(
packages=[
'haruhi_dl',
'haruhi_dl.extractor', 'haruhi_dl.downloader',
'haruhi_dl.postprocessor'],
'haruhi_dl.postprocessor', 'haruhi_dl.extractor_artifacts'],
# Provokes warning on most systems (why?!)
# test_suite = 'nose.collector',