mirror of
				https://github.com/yt-dlp/yt-dlp.git
				synced 2025-11-04 08:35:12 +00:00 
			
		
		
		
	[nhl] Simplify
This commit is contained in:
		@@ -26,9 +26,7 @@ class NHLBaseInfoExtractor(InfoExtractor):
 | 
				
			|||||||
        initial_video_url = info['publishPoint']
 | 
					        initial_video_url = info['publishPoint']
 | 
				
			||||||
        if info['formats'] == '1':
 | 
					        if info['formats'] == '1':
 | 
				
			||||||
            parsed_url = compat_urllib_parse_urlparse(initial_video_url)
 | 
					            parsed_url = compat_urllib_parse_urlparse(initial_video_url)
 | 
				
			||||||
            path = parsed_url.path
 | 
					            path = parsed_url.path.replace('.', '_sd.', 1)
 | 
				
			||||||
            extension_index = path.rfind('.')
 | 
					 | 
				
			||||||
            path = path[:extension_index] + '_sd' + path[extension_index:]
 | 
					 | 
				
			||||||
            data = compat_urllib_parse.urlencode({
 | 
					            data = compat_urllib_parse.urlencode({
 | 
				
			||||||
                'type': 'fvod',
 | 
					                'type': 'fvod',
 | 
				
			||||||
                'path': compat_urlparse.urlunparse(parsed_url[:2] + (path,) + parsed_url[3:])
 | 
					                'path': compat_urlparse.urlunparse(parsed_url[:2] + (path,) + parsed_url[3:])
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user