mirror of
https://github.com/yt-dlp/yt-dlp
synced 2024-12-14 03:19:58 +01:00
[ie/MicrosoftEmbed] Make format extraction non fatal (#11654)
Authored by: seproDev
This commit is contained in:
parent
62cba8a1be
commit
2bea793632
@ -26,6 +26,7 @@ class MicrosoftEmbedIE(InfoExtractor):
|
|||||||
'timestamp': 1631658316,
|
'timestamp': 1631658316,
|
||||||
'upload_date': '20210914',
|
'upload_date': '20210914',
|
||||||
},
|
},
|
||||||
|
'expected_warnings': ['Failed to parse XML: syntax error: line 1, column 0'],
|
||||||
}]
|
}]
|
||||||
_API_URL = 'https://prod-video-cms-rt-microsoft-com.akamaized.net/vhs/api/videos/'
|
_API_URL = 'https://prod-video-cms-rt-microsoft-com.akamaized.net/vhs/api/videos/'
|
||||||
|
|
||||||
@ -36,11 +37,11 @@ class MicrosoftEmbedIE(InfoExtractor):
|
|||||||
formats = []
|
formats = []
|
||||||
for source_type, source in metadata['streams'].items():
|
for source_type, source in metadata['streams'].items():
|
||||||
if source_type == 'smooth_Streaming':
|
if source_type == 'smooth_Streaming':
|
||||||
formats.extend(self._extract_ism_formats(source['url'], video_id, 'mss'))
|
formats.extend(self._extract_ism_formats(source['url'], video_id, 'mss', fatal=False))
|
||||||
elif source_type == 'apple_HTTP_Live_Streaming':
|
elif source_type == 'apple_HTTP_Live_Streaming':
|
||||||
formats.extend(self._extract_m3u8_formats(source['url'], video_id, 'mp4'))
|
formats.extend(self._extract_m3u8_formats(source['url'], video_id, 'mp4', fatal=False))
|
||||||
elif source_type == 'mPEG_DASH':
|
elif source_type == 'mPEG_DASH':
|
||||||
formats.extend(self._extract_mpd_formats(source['url'], video_id))
|
formats.extend(self._extract_mpd_formats(source['url'], video_id, fatal=False))
|
||||||
else:
|
else:
|
||||||
formats.append({
|
formats.append({
|
||||||
'format_id': source_type,
|
'format_id': source_type,
|
||||||
|
Loading…
Reference in New Issue
Block a user