mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-05 08:40:04 +01:00
[YoutubeDL] Do not loose request method information
This commit is contained in:
parent
db1e9ee771
commit
931bc3c3a7
@ -49,6 +49,7 @@
|
||||
ExtractorError,
|
||||
format_bytes,
|
||||
formatSeconds,
|
||||
HEADRequest,
|
||||
locked_file,
|
||||
make_HTTPS_handler,
|
||||
MaxDownloadsReached,
|
||||
@ -1720,7 +1721,8 @@ def urlopen(self, req):
|
||||
if req_is_string:
|
||||
req = url_escaped
|
||||
else:
|
||||
req = compat_urllib_request.Request(
|
||||
req_type = HEADRequest if req.get_method() == 'HEAD' else compat_urllib_request.Request
|
||||
req = req_type(
|
||||
url_escaped, data=req.data, headers=req.headers,
|
||||
origin_req_host=req.origin_req_host, unverifiable=req.unverifiable)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user