mirror of
				https://github.com/yt-dlp/yt-dlp.git
				synced 2025-11-04 08:35:12 +00:00 
			
		
		
		
	[YoutubeDL] Do not loose request method information
This commit is contained in:
		@@ -49,6 +49,7 @@ from .utils import (
 | 
				
			|||||||
    ExtractorError,
 | 
					    ExtractorError,
 | 
				
			||||||
    format_bytes,
 | 
					    format_bytes,
 | 
				
			||||||
    formatSeconds,
 | 
					    formatSeconds,
 | 
				
			||||||
 | 
					    HEADRequest,
 | 
				
			||||||
    locked_file,
 | 
					    locked_file,
 | 
				
			||||||
    make_HTTPS_handler,
 | 
					    make_HTTPS_handler,
 | 
				
			||||||
    MaxDownloadsReached,
 | 
					    MaxDownloadsReached,
 | 
				
			||||||
@@ -1720,7 +1721,8 @@ class YoutubeDL(object):
 | 
				
			|||||||
            if req_is_string:
 | 
					            if req_is_string:
 | 
				
			||||||
                req = url_escaped
 | 
					                req = url_escaped
 | 
				
			||||||
            else:
 | 
					            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,
 | 
					                    url_escaped, data=req.data, headers=req.headers,
 | 
				
			||||||
                    origin_req_host=req.origin_req_host, unverifiable=req.unverifiable)
 | 
					                    origin_req_host=req.origin_req_host, unverifiable=req.unverifiable)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user