mirror of
				https://github.com/yt-dlp/yt-dlp.git
				synced 2025-11-04 00:25:15 +00:00 
			
		
		
		
	[youtube] Simplify url_encoded_fmt_stream_map check
This commit is contained in:
		@@ -871,8 +871,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
 | 
				
			|||||||
                args = ytplayer_config['args']
 | 
					                args = ytplayer_config['args']
 | 
				
			||||||
                # Convert to the same format returned by compat_parse_qs
 | 
					                # Convert to the same format returned by compat_parse_qs
 | 
				
			||||||
                video_info = dict((k, [v]) for k, v in args.items())
 | 
					                video_info = dict((k, [v]) for k, v in args.items())
 | 
				
			||||||
                if ('url_encoded_fmt_stream_map' not in args or
 | 
					                if not args.get('url_encoded_fmt_stream_map'):
 | 
				
			||||||
                        args['url_encoded_fmt_stream_map'] == ''):
 | 
					 | 
				
			||||||
                    raise ValueError('No stream_map present')  # caught below
 | 
					                    raise ValueError('No stream_map present')  # caught below
 | 
				
			||||||
            except ValueError:
 | 
					            except ValueError:
 | 
				
			||||||
                # We fallback to the get_video_info pages (used by the embed page)
 | 
					                # We fallback to the get_video_info pages (used by the embed page)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user