mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-11-22 18:22:21 +00:00
[utils] Let request headers override standard headers
What was I thinking when writing this?
This commit is contained in:
parent
0963f92f23
commit
33ac271ba7
1 changed files with 3 additions and 4 deletions
|
@ -766,9 +766,8 @@ class YoutubeDLHandler(compat_urllib_request.HTTPHandler):
|
|||
return ret
|
||||
|
||||
def http_request(self, req):
|
||||
for h,v in std_headers.items():
|
||||
if h in req.headers:
|
||||
del req.headers[h]
|
||||
for h, v in std_headers.items():
|
||||
if h not in req.headers:
|
||||
req.add_header(h, v)
|
||||
if 'Youtubedl-no-compression' in req.headers:
|
||||
if 'Accept-encoding' in req.headers:
|
||||
|
|
Loading…
Reference in a new issue