[comedycentral/mtv] Add support for HLS videos (fixes #11600)
[youtube-dl] / youtube_dl / extractor / comedycentral.py
index 528ff7fa3c1deedbdbacfc9c604f5872c1014839..8bd58977493bf2445e768604d8953b0474287918 100644 (file)
@@ -6,7 +6,7 @@ from .common import InfoExtractor
 
 class ComedyCentralIE(MTVServicesInfoExtractor):
     _VALID_URL = r'''(?x)https?://(?:www\.)?cc\.com/
-        (video-clips|episodes|cc-studios|video-collections|shows)
+        (video-clips|episodes|cc-studios|video-collections|shows(?=/[^/]+/(?!full-episodes)))
         /(?P<title>.*)'''
     _FEED_URL = 'http://comedycentral.com/feeds/mrss/'
 
@@ -29,7 +29,7 @@ class ComedyCentralIE(MTVServicesInfoExtractor):
 
 class ComedyCentralFullEpisodesIE(MTVServicesInfoExtractor):
     _VALID_URL = r'''(?x)https?://(?:www\.)?cc\.com/
-        (?:full-episodes)
+        (?:full-episodes|shows(?=/[^/]+/full-episodes))
         /(?P<id>[^?]+)'''
     _FEED_URL = 'http://comedycentral.com/feeds/mrss/'
 
@@ -40,6 +40,9 @@ class ComedyCentralFullEpisodesIE(MTVServicesInfoExtractor):
             'title': 'November 28, 2016 - Ryan Speedo Green',
         },
         'playlist_count': 4,
+    }, {
+        'url': 'http://www.cc.com/shows/the-daily-show-with-trevor-noah/full-episodes',
+        'only_matching': True,
     }]
 
     def _real_extract(self, url):
@@ -54,7 +57,8 @@ class ComedyCentralFullEpisodesIE(MTVServicesInfoExtractor):
         feed = self._download_json(video_zone['feed'], playlist_id)
         mgid = feed['result']['data']['id']
 
-        videos_info = self._get_videos_info(mgid)
+        videos_info = self._get_videos_info(mgid, use_hls=True)
+
         return videos_info
 
 
@@ -76,7 +80,7 @@ class ToshIE(MTVServicesInfoExtractor):
                 'ext': 'mp4',
                 'title': 'Tosh.0|June 9, 2077|2|211|Twitter Users Share Summer Plans',
                 'description': 'Tosh asked fans to share their summer plans.',
-                'thumbnail': 're:^https?://.*\.jpg',
+                'thumbnail': r're:^https?://.*\.jpg',
                 # It's really reported to be published on year 2077
                 'upload_date': '20770610',
                 'timestamp': 3390510600,