youtube-dl

Another place where youtube-dl lives on
git clone git://git.oshgnacknak.de/youtube-dl.git
Log | Files | Refs | README | LICENSE

comedycentral.py (2036B)


      1 from __future__ import unicode_literals
      2 
      3 from .mtv import MTVServicesInfoExtractor
      4 
      5 
      6 class ComedyCentralIE(MTVServicesInfoExtractor):
      7     _VALID_URL = r'https?://(?:www\.)?cc\.com/(?:episodes|video(?:-clips)?)/(?P<id>[0-9a-z]{6})'
      8     _FEED_URL = 'http://comedycentral.com/feeds/mrss/'
      9 
     10     _TESTS = [{
     11         'url': 'http://www.cc.com/video-clips/5ke9v2/the-daily-show-with-trevor-noah-doc-rivers-and-steve-ballmer---the-nba-player-strike',
     12         'md5': 'b8acb347177c680ff18a292aa2166f80',
     13         'info_dict': {
     14             'id': '89ccc86e-1b02-4f83-b0c9-1d9592ecd025',
     15             'ext': 'mp4',
     16             'title': 'The Daily Show with Trevor Noah|August 28, 2020|25|25149|Doc Rivers and Steve Ballmer - The NBA Player Strike',
     17             'description': 'md5:5334307c433892b85f4f5e5ac9ef7498',
     18             'timestamp': 1598670000,
     19             'upload_date': '20200829',
     20         },
     21     }, {
     22         'url': 'http://www.cc.com/episodes/pnzzci/drawn-together--american-idol--parody-clip-show-season-3-ep-314',
     23         'only_matching': True,
     24     }, {
     25         'url': 'https://www.cc.com/video/k3sdvm/the-daily-show-with-jon-stewart-exclusive-the-fourth-estate',
     26         'only_matching': True,
     27     }]
     28 
     29 
     30 class ComedyCentralTVIE(MTVServicesInfoExtractor):
     31     _VALID_URL = r'https?://(?:www\.)?comedycentral\.tv/folgen/(?P<id>[0-9a-z]{6})'
     32     _TESTS = [{
     33         'url': 'https://www.comedycentral.tv/folgen/pxdpec/josh-investigates-klimawandel-staffel-1-ep-1',
     34         'info_dict': {
     35             'id': '15907dc3-ec3c-11e8-a442-0e40cf2fc285',
     36             'ext': 'mp4',
     37             'title': 'Josh Investigates',
     38             'description': 'Steht uns das Ende der Welt bevor?',
     39         },
     40     }]
     41     _FEED_URL = 'http://feeds.mtvnservices.com/od/feed/intl-mrss-player-feed'
     42     _GEO_COUNTRIES = ['DE']
     43 
     44     def _get_feed_query(self, uri):
     45         return {
     46             'accountOverride': 'intl.mtvi.com',
     47             'arcEp': 'web.cc.tv',
     48             'ep': 'b9032c3a',
     49             'imageEp': 'web.cc.tv',
     50             'mgid': uri,
     51         }