diff options
author | Remita Amine <remitamine@gmail.com> | 2019-12-03 12:23:08 +0100 |
---|---|---|
committer | Remita Amine <remitamine@gmail.com> | 2019-12-03 12:23:08 +0100 |
commit | c712b16dc41b792757ee8e13a59bce9ab3b4e5b4 (patch) | |
tree | ad08c71136c7e1bb07f1cbae87403dbb4deaf4ad /youtube_dl/downloader | |
parent | 6797de75e059ec02ed91548ec8bfed8c89578344 (diff) |
[vzaar] override AES decryption key URL(closes #17521)
Diffstat (limited to 'youtube_dl/downloader')
-rw-r--r-- | youtube_dl/downloader/hls.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/youtube_dl/downloader/hls.py b/youtube_dl/downloader/hls.py index b59aad73f..84bc34928 100644 --- a/youtube_dl/downloader/hls.py +++ b/youtube_dl/downloader/hls.py @@ -64,7 +64,7 @@ class HlsFD(FragmentFD): s = urlh.read().decode('utf-8', 'ignore') if not self.can_download(s, info_dict): - if info_dict.get('extra_param_to_segment_url'): + if info_dict.get('extra_param_to_segment_url') or info_dict.get('_decryption_key_url'): self.report_error('pycrypto not found. Please install it.') return False self.report_warning( @@ -169,7 +169,7 @@ class HlsFD(FragmentFD): if decrypt_info['METHOD'] == 'AES-128': iv = decrypt_info.get('IV') or compat_struct_pack('>8xq', media_sequence) decrypt_info['KEY'] = decrypt_info.get('KEY') or self.ydl.urlopen( - self._prepare_url(info_dict, decrypt_info['URI'])).read() + self._prepare_url(info_dict, info_dict.get('_decryption_key_url') or decrypt_info['URI'])).read() frag_content = AES.new( decrypt_info['KEY'], AES.MODE_CBC, iv).decrypt(frag_content) self._append_fragment(ctx, frag_content) |