mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-28 07:36:52 +01:00
[utils] Let request headers override standard headers
What was I thinking when writing this?
This commit is contained in:
parent
0963f92f23
commit
33ac271ba7
@ -767,8 +767,7 @@ def addinfourl_wrapper(stream, headers, url, code):
|
|||||||
|
|
||||||
def http_request(self, req):
|
def http_request(self, req):
|
||||||
for h, v in std_headers.items():
|
for h, v in std_headers.items():
|
||||||
if h in req.headers:
|
if h not in req.headers:
|
||||||
del req.headers[h]
|
|
||||||
req.add_header(h, v)
|
req.add_header(h, v)
|
||||||
if 'Youtubedl-no-compression' in req.headers:
|
if 'Youtubedl-no-compression' in req.headers:
|
||||||
if 'Accept-encoding' in req.headers:
|
if 'Accept-encoding' in req.headers:
|
||||||
|
Loading…
Reference in New Issue
Block a user