extract ISM formats in some of the extractors
authorRemita Amine <remitamine@gmail.com>
Wed, 19 Oct 2016 15:24:43 +0000 (16:24 +0100)
committerSergey M <dstftw@gmail.com>
Tue, 1 Nov 2016 18:54:45 +0000 (01:54 +0700)
youtube_dl/extractor/microsoftvirtualacademy.py
youtube_dl/extractor/msn.py
youtube_dl/extractor/onet.py
youtube_dl/extractor/tvp.py

index afd3e98ecbf1cd4d2016550bf715bd0a4b3fe167..8e0aee0e69699ee4065c8e4c8addb4db0e537caf 100644 (file)
@@ -71,12 +71,15 @@ class MicrosoftVirtualAcademyIE(MicrosoftVirtualAcademyBaseIE):
         formats = []
 
         for sources in settings.findall(compat_xpath('.//MediaSources')):
-            if sources.get('videoType') == 'smoothstreaming':
-                continue
+            sources_type = sources.get('videoType')
             for source in sources.findall(compat_xpath('./MediaSource')):
                 video_url = source.text
                 if not video_url or not video_url.startswith('http'):
                     continue
+                if sources_type == 'smoothstreaming':
+                    formats.extend(self._extract_ism_formats(
+                        video_url, video_id, 'mss', fatal=False))
+                    continue
                 video_mode = source.get('videoMode')
                 height = int_or_none(self._search_regex(
                     r'^(\d+)[pP]$', video_mode or '', 'height', default=None))
index 1ec8e0f50e6d407aa05e358a1809a1633d97876a..d75ce8b3b510b68ca0dfe754d8fcf1741e6cbd9d 100644 (file)
@@ -69,10 +69,9 @@ class MSNIE(InfoExtractor):
             if not format_url:
                 continue
             ext = determine_ext(format_url)
-            # .ism is not yet supported (see
-            # https://github.com/rg3/youtube-dl/issues/8118)
             if ext == 'ism':
-                continue
+                formats.extend(self._extract_ism_formats(
+                    format_url + '/Manifest', display_id, 'mss', fatal=False))
             if 'm3u8' in format_url:
                 # m3u8_native should not be used here until
                 # https://github.com/rg3/youtube-dl/issues/9913 is fixed
index 9cbc7c2e2f8888f32722f95d816dea4fdb9325db..0a501b3e5b9f0c0bd2c6789e4da302b7610ced28 100644 (file)
@@ -56,8 +56,8 @@ class OnetBaseIE(InfoExtractor):
                         continue
                     ext = determine_ext(video_url)
                     if format_id == 'ism':
-                        # TODO: Support Microsoft Smooth Streaming
-                        continue
+                        formats.extend(self._extract_ism_formats(
+                            video_url, video_id, 'mss', fatal=False))
                     elif ext == 'mpd':
                         formats.extend(self._extract_mpd_formats(
                             video_url, video_id, mpd_id='dash', fatal=False))
index 2dbbc2ca7c86aa30a30716bd73cdd5ba18495e3a..06ea2b40a759158baa2c561498e5155011f418ec 100644 (file)
@@ -139,6 +139,9 @@ class TVPEmbedIE(InfoExtractor):
             # formats.extend(self._extract_mpd_formats(
             #     video_url_base + '.ism/video.mpd',
             #     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(
                 video_url_base + '.ism/video.f4m',
                 video_id, f4m_id='hds', fatal=False))