]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/corus.py
7b2f5008b5b525842d7ac248b1ca2f8f366a72dd
2 from __future__
import unicode_literals
6 from .theplatform
import ThePlatformFeedIE
7 from ..utils
import int_or_none
10 class CorusIE(ThePlatformFeedIE
):
11 _VALID_URL
= r
'https?://(?:www\.)?(?P<domain>(?:globaltv|etcanada)\.com|(?:hgtv|foodnetwork|slice)\.ca)/(?:video/|(?:[^/]+/)+(?:videos/[a-z0-9-]+-|video\.html\?.*?\bv=))(?P<id>\d+)'
13 'url': 'http://www.hgtv.ca/shows/bryan-inc/videos/movie-night-popcorn-with-bryan-870923331648/',
14 'md5': '05dcbca777bf1e58c2acbb57168ad3a6',
18 'title': 'Movie Night Popcorn with Bryan',
19 'description': 'Bryan whips up homemade popcorn, the old fashion way for Jojo and Lincoln.',
20 'uploader': 'SHWM-NEW',
21 'upload_date': '20170206',
22 'timestamp': 1486392197,
25 'url': 'http://www.foodnetwork.ca/shows/chopped/video/episode/chocolate-obsession/video.html?v=872683587753',
26 'only_matching': True,
28 'url': 'http://etcanada.com/video/873675331955/meet-the-survivor-game-changers-castaways-part-2/',
29 'only_matching': True,
34 'feed_id': 'ChQqrem0lNUp',
35 'account_id': 2269680845,
38 'feed_id': 'ChQqrem0lNUp',
39 'account_id': 2269680845,
42 'feed_id': 'L0BMHXi2no43',
43 'account_id': 2414428465,
46 'feed_id': 'ukK8o58zbRmJ',
47 'account_id': 2414429569,
50 'feed_id': '5tUJLgV2YNJ5',
51 'account_id': 2414427935,
55 def _real_extract(self
, url
):
56 domain
, video_id
= re
.match(self
._VALID
_URL
, url
).groups()
57 feed_info
= self
._TP
_FEEDS
[domain
.split('.')[0]]
58 return self
._extract
_feed
_info
('dtjsEC', feed_info
['feed_id'], 'byId=' + video_id
, video_id
, lambda e
: {
59 'episode_number': int_or_none(e
.get('pl1$episode')),
60 'season_number': int_or_none(e
.get('pl1$season')),
61 'series': e
.get('pl1$show'),
66 'DesktopHLS Default': {
72 }, feed_info
['account_id'])