mirror of
				https://gitlab.com/ytdl-org/youtube-dl.git
				synced 2025-11-03 19:57:06 -05:00 
			
		
		
		
	Fix parsing of HTML5 media elements
This fixes an error in _parse_html5_media_entries in case an audio or video tag directly uses a src attribute insted of <source> elements in it's body.
This commit is contained in:
		
				
					committed by
					
						
						Sergey M․
					
				
			
			
				
	
			
			
			
						parent
						
							86c3bbbced
						
					
				
				
					commit
					dedb177029
				
			@@ -1749,7 +1749,7 @@ class InfoExtractor(object):
 | 
				
			|||||||
            media_attributes = extract_attributes(media_tag)
 | 
					            media_attributes = extract_attributes(media_tag)
 | 
				
			||||||
            src = media_attributes.get('src')
 | 
					            src = media_attributes.get('src')
 | 
				
			||||||
            if src:
 | 
					            if src:
 | 
				
			||||||
                _, formats = _media_formats(src)
 | 
					                _, formats = _media_formats(src, media_type)
 | 
				
			||||||
                media_info['formats'].extend(formats)
 | 
					                media_info['formats'].extend(formats)
 | 
				
			||||||
            media_info['thumbnail'] = media_attributes.get('poster')
 | 
					            media_info['thumbnail'] = media_attributes.get('poster')
 | 
				
			||||||
            if media_content:
 | 
					            if media_content:
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user