[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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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