1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-10-31 22:55:18 +00:00

[core] Deprecate internal Youtubedl-no-compression header (#6876)

Authored by: coletdjnz
This commit is contained in:
coletdjnz
2023-05-21 10:55:09 +12:00
committed by GitHub
parent 69bec6730e
commit 955c89584b
6 changed files with 23 additions and 24 deletions

View File

@@ -2380,7 +2380,9 @@ class YoutubeDL:
def _calc_headers(self, info_dict):
res = merge_headers(self.params['http_headers'], info_dict.get('http_headers') or {})
if 'Youtubedl-No-Compression' in res: # deprecated
res.pop('Youtubedl-No-Compression', None)
res['Accept-Encoding'] = 'identity'
cookies = self._calc_cookies(info_dict['url'])
if cookies:
res['Cookie'] = cookies