mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-12-14 13:17:00 +01:00
extract ISM formats in some of the extractors
This commit is contained in:
parent
b2758123c5
commit
639e3b5c99
@ -71,12 +71,15 @@ class MicrosoftVirtualAcademyIE(MicrosoftVirtualAcademyBaseIE):
|
|||||||
formats = []
|
formats = []
|
||||||
|
|
||||||
for sources in settings.findall(compat_xpath('.//MediaSources')):
|
for sources in settings.findall(compat_xpath('.//MediaSources')):
|
||||||
if sources.get('videoType') == 'smoothstreaming':
|
sources_type = sources.get('videoType')
|
||||||
continue
|
|
||||||
for source in sources.findall(compat_xpath('./MediaSource')):
|
for source in sources.findall(compat_xpath('./MediaSource')):
|
||||||
video_url = source.text
|
video_url = source.text
|
||||||
if not video_url or not video_url.startswith('http'):
|
if not video_url or not video_url.startswith('http'):
|
||||||
continue
|
continue
|
||||||
|
if sources_type == 'smoothstreaming':
|
||||||
|
formats.extend(self._extract_ism_formats(
|
||||||
|
video_url, video_id, 'mss', fatal=False))
|
||||||
|
continue
|
||||||
video_mode = source.get('videoMode')
|
video_mode = source.get('videoMode')
|
||||||
height = int_or_none(self._search_regex(
|
height = int_or_none(self._search_regex(
|
||||||
r'^(\d+)[pP]$', video_mode or '', 'height', default=None))
|
r'^(\d+)[pP]$', video_mode or '', 'height', default=None))
|
||||||
|
@ -69,10 +69,9 @@ class MSNIE(InfoExtractor):
|
|||||||
if not format_url:
|
if not format_url:
|
||||||
continue
|
continue
|
||||||
ext = determine_ext(format_url)
|
ext = determine_ext(format_url)
|
||||||
# .ism is not yet supported (see
|
|
||||||
# https://github.com/rg3/youtube-dl/issues/8118)
|
|
||||||
if ext == 'ism':
|
if ext == 'ism':
|
||||||
continue
|
formats.extend(self._extract_ism_formats(
|
||||||
|
format_url + '/Manifest', display_id, 'mss', fatal=False))
|
||||||
if 'm3u8' in format_url:
|
if 'm3u8' in format_url:
|
||||||
# m3u8_native should not be used here until
|
# m3u8_native should not be used here until
|
||||||
# https://github.com/rg3/youtube-dl/issues/9913 is fixed
|
# https://github.com/rg3/youtube-dl/issues/9913 is fixed
|
||||||
|
@ -56,8 +56,8 @@ class OnetBaseIE(InfoExtractor):
|
|||||||
continue
|
continue
|
||||||
ext = determine_ext(video_url)
|
ext = determine_ext(video_url)
|
||||||
if format_id == 'ism':
|
if format_id == 'ism':
|
||||||
# TODO: Support Microsoft Smooth Streaming
|
formats.extend(self._extract_ism_formats(
|
||||||
continue
|
video_url, video_id, 'mss', fatal=False))
|
||||||
elif ext == 'mpd':
|
elif ext == 'mpd':
|
||||||
formats.extend(self._extract_mpd_formats(
|
formats.extend(self._extract_mpd_formats(
|
||||||
video_url, video_id, mpd_id='dash', fatal=False))
|
video_url, video_id, mpd_id='dash', fatal=False))
|
||||||
|
@ -139,6 +139,9 @@ class TVPEmbedIE(InfoExtractor):
|
|||||||
# formats.extend(self._extract_mpd_formats(
|
# formats.extend(self._extract_mpd_formats(
|
||||||
# video_url_base + '.ism/video.mpd',
|
# video_url_base + '.ism/video.mpd',
|
||||||
# video_id, mpd_id='dash', fatal=False))
|
# video_id, mpd_id='dash', fatal=False))
|
||||||
|
formats.extend(self._extract_ism_formats(
|
||||||
|
video_url_base + '.ism/Manifest',
|
||||||
|
video_id, 'mss', fatal=False))
|
||||||
formats.extend(self._extract_f4m_formats(
|
formats.extend(self._extract_f4m_formats(
|
||||||
video_url_base + '.ism/video.f4m',
|
video_url_base + '.ism/video.f4m',
|
||||||
video_id, f4m_id='hds', fatal=False))
|
video_id, f4m_id='hds', fatal=False))
|
||||||
|
Loading…
Reference in New Issue
Block a user