mirror of
				https://gitlab.com/ytdl-org/youtube-dl.git
				synced 2025-11-04 03:37:08 -05:00 
			
		
		
		
	[extractor/common] add support for DASH and MSS formats extraction in SMIL manifests
This commit is contained in:
		@@ -1859,9 +1859,7 @@ class InfoExtractor(object):
 | 
				
			|||||||
                        'height': height,
 | 
					                        'height': height,
 | 
				
			||||||
                    })
 | 
					                    })
 | 
				
			||||||
                formats.extend(m3u8_formats)
 | 
					                formats.extend(m3u8_formats)
 | 
				
			||||||
                continue
 | 
					            elif src_ext == 'f4m':
 | 
				
			||||||
 | 
					 | 
				
			||||||
            if src_ext == 'f4m':
 | 
					 | 
				
			||||||
                f4m_url = src_url
 | 
					                f4m_url = src_url
 | 
				
			||||||
                if not f4m_params:
 | 
					                if not f4m_params:
 | 
				
			||||||
                    f4m_params = {
 | 
					                    f4m_params = {
 | 
				
			||||||
@@ -1871,9 +1869,13 @@ class InfoExtractor(object):
 | 
				
			|||||||
                f4m_url += '&' if '?' in f4m_url else '?'
 | 
					                f4m_url += '&' if '?' in f4m_url else '?'
 | 
				
			||||||
                f4m_url += compat_urllib_parse_urlencode(f4m_params)
 | 
					                f4m_url += compat_urllib_parse_urlencode(f4m_params)
 | 
				
			||||||
                formats.extend(self._extract_f4m_formats(f4m_url, video_id, f4m_id='hds', fatal=False))
 | 
					                formats.extend(self._extract_f4m_formats(f4m_url, video_id, f4m_id='hds', fatal=False))
 | 
				
			||||||
                continue
 | 
					            elif src_ext == 'mpd':
 | 
				
			||||||
 | 
					                formats.extend(self._extract_mpd_formats(
 | 
				
			||||||
            if src_url.startswith('http') and self._is_valid_url(src, video_id):
 | 
					                    src_url, video_id, mpd_id='dash', fatal=False))
 | 
				
			||||||
 | 
					            elif re.search(r'\.ism/[Mm]anifest', src_url):
 | 
				
			||||||
 | 
					                formats.extend(self._extract_ism_formats(
 | 
				
			||||||
 | 
					                    src_url, video_id, ism_id='mss', fatal=False))
 | 
				
			||||||
 | 
					            elif src_url.startswith('http') and self._is_valid_url(src, video_id):
 | 
				
			||||||
                http_count += 1
 | 
					                http_count += 1
 | 
				
			||||||
                formats.append({
 | 
					                formats.append({
 | 
				
			||||||
                    'url': src_url,
 | 
					                    'url': src_url,
 | 
				
			||||||
@@ -1884,7 +1886,6 @@ class InfoExtractor(object):
 | 
				
			|||||||
                    'width': width,
 | 
					                    'width': width,
 | 
				
			||||||
                    'height': height,
 | 
					                    'height': height,
 | 
				
			||||||
                })
 | 
					                })
 | 
				
			||||||
                continue
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
        return formats
 | 
					        return formats
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user