]> jfr.im git - yt-dlp.git/commitdiff
[extractor/shemaroome] Pass `stream_key` header to downloader (#7224)
authorbashonly <redacted>
Sun, 4 Jun 2023 14:07:13 +0000 (09:07 -0500)
committerGitHub <redacted>
Sun, 4 Jun 2023 14:07:13 +0000 (14:07 +0000)
Closes #7133
Authored by: bashonly

yt_dlp/extractor/shemaroome.py

index 7a78c6e054aa9aaf18dc0bb1c6e189099fd92da6..ec9938b8cb8b5afa55e5575869a72bec63f419ee 100644 (file)
@@ -73,7 +73,10 @@ def _real_extract(self, url):
         key = bytes_to_intlist(compat_b64decode(data_json['key']))
         iv = [0] * 16
         m3u8_url = unpad_pkcs7(intlist_to_bytes(aes_cbc_decrypt(url_data, key, iv))).decode('ascii')
-        formats, m3u8_subs = self._extract_m3u8_formats_and_subtitles(m3u8_url, video_id, fatal=False, headers={'stream_key': data_json['stream_key']})
+        headers = {'stream_key': data_json['stream_key']}
+        formats, m3u8_subs = self._extract_m3u8_formats_and_subtitles(m3u8_url, video_id, fatal=False, headers=headers)
+        for fmt in formats:
+            fmt['http_headers'] = headers
 
         release_date = self._html_search_regex(
             (r'itemprop="uploadDate">\s*([\d-]+)', r'id="release_date" value="([\d-]+)'),