]>
Raphaël G. Git Repositories - youtubedl/blob - youtube_dl/extractor/bellmedia.py
   2 from __future__ 
import unicode_literals
 
   6 from .common 
import InfoExtractor
 
   9 class BellMediaIE(InfoExtractor
): 
  10     _VALID_URL 
= r
'''(?x)https?://(?:www\.)? 
  20                 investigationdiscovery| 
  27         )/.*?(?:\bvid=|-vid|~|%7E|/(?:episode)?)(?P<id>[0-9]{6})''' 
  29         'url': 'http://www.ctv.ca/video/player?vid=706966', 
  30         'md5': 'ff2ebbeae0aa2dcc32a830c3fd69b7b0', 
  34             'title': 'Larry Day and Richard Jutras on the TIFF red carpet of \'Stonewall\'', 
  35             'description': 'etalk catches up with Larry Day and Richard Jutras on the TIFF red carpet of "Stonewall”.', 
  36             'upload_date': '20150919', 
  37             'timestamp': 1442624700, 
  39         'expected_warnings': ['HTTP Error 404'], 
  41         'url': 'http://www.thecomedynetwork.ca/video/player?vid=923582', 
  42         'only_matching': True, 
  44         'url': 'http://www.tsn.ca/video/expectations-high-for-milos-raonic-at-us-open~939549', 
  45         'only_matching': True, 
  47         'url': 'http://www.bnn.ca/video/berman-s-call-part-two-viewer-questions~939654', 
  48         'only_matching': True, 
  50         'url': 'http://www.ctv.ca/YourMorning/Video/S1E6-Monday-August-29-2016-vid938009', 
  51         'only_matching': True, 
  53         'url': 'http://www.much.com/shows/atmidnight/episode948007/tuesday-september-13-2016', 
  54         'only_matching': True, 
  56         'url': 'http://www.much.com/shows/the-almost-impossible-gameshow/928979/episode-6', 
  57         'only_matching': True, 
  60         'thecomedynetwork': 'comedy', 
  61         'discoveryvelocity': 'discvel', 
  62         'sciencechannel': 'discsci', 
  63         'investigationdiscovery': 'invdisc', 
  64         'animalplanet': 'aniplan', 
  67     def _real_extract(self
, url
): 
  68         domain
, video_id 
= re
.match(self
._VALID
_URL
, url
).groups() 
  69         domain 
= domain
.split('.')[0] 
  71             '_type': 'url_transparent', 
  73             'url': '9c9media:%s_web:%s' % (self
._DOMAINS
.get(domain
, domain
), video_id
), 
  74             'ie_key': 'NineCNineMedia',