Browse Source

[downloader/hls] Use HTTP headers for key request

master-ytdl-org
Sergey M․ 7 years ago
parent
commit
538d4f8681
No known key found for this signature in database GPG Key ID: 2C393E0F18A9236D
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      youtube_dl/downloader/hls.py

+ 2
- 1
youtube_dl/downloader/hls.py View File

@ -163,7 +163,8 @@ class HlsFD(FragmentFD):
return False
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(decrypt_info['URI']).read()
decrypt_info['KEY'] = decrypt_info.get('KEY') or self.ydl.urlopen(
self._prepare_url(info_dict, decrypt_info['URI'])).read()
frag_content = AES.new(
decrypt_info['KEY'], AES.MODE_CBC, iv).decrypt(frag_content)
self._append_fragment(ctx, frag_content)


Loading…
Cancel
Save