mirror of
				https://github.com/yt-dlp/yt-dlp.git
				synced 2025-11-04 08:35:12 +00:00 
			
		
		
		
	[utils] Don't touch URLs if not necessary
Fix test_Generic_15 (Google redirect)
This commit is contained in:
		@@ -1792,6 +1792,8 @@ def urlencode_postdata(*args, **kargs):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def update_url_query(url, query):
 | 
					def update_url_query(url, query):
 | 
				
			||||||
 | 
					    if not query:
 | 
				
			||||||
 | 
					        return url
 | 
				
			||||||
    parsed_url = compat_urlparse.urlparse(url)
 | 
					    parsed_url = compat_urlparse.urlparse(url)
 | 
				
			||||||
    qs = compat_parse_qs(parsed_url.query)
 | 
					    qs = compat_parse_qs(parsed_url.query)
 | 
				
			||||||
    qs.update(query)
 | 
					    qs.update(query)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user