]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/corus.py
807a29eeaad9d71ba56384774d23f0e5e3ecc397
2 from __future__
import unicode_literals
6 from .theplatform
import ThePlatformFeedIE
7 from ..utils
import int_or_none
10 class CorusIE(ThePlatformFeedIE
):
15 (?:globaltv|etcanada)\.com|
16 (?:hgtv|foodnetwork|slice|history|showcase)\.ca
18 /(?:video/|(?:[^/]+/)+(?:videos/[a-z0-9-]+-|video\.html\?.*?\bv=))
22 'url': 'http://www.hgtv.ca/shows/bryan-inc/videos/movie-night-popcorn-with-bryan-870923331648/',
23 'md5': '05dcbca777bf1e58c2acbb57168ad3a6',
27 'title': 'Movie Night Popcorn with Bryan',
28 'description': 'Bryan whips up homemade popcorn, the old fashion way for Jojo and Lincoln.',
29 'uploader': 'SHWM-NEW',
30 'upload_date': '20170206',
31 'timestamp': 1486392197,
34 'url': 'http://www.foodnetwork.ca/shows/chopped/video/episode/chocolate-obsession/video.html?v=872683587753',
35 'only_matching': True,
37 'url': 'http://etcanada.com/video/873675331955/meet-the-survivor-game-changers-castaways-part-2/',
38 'only_matching': True,
40 'url': 'http://www.history.ca/the-world-without-canada/video/full-episodes/natural-resources/video.html?v=955054659646#video',
41 'only_matching': True,
43 'url': 'http://www.showcase.ca/eyewitness/video/eyewitness++106/video.html?v=955070531919&p=1&s=da#video',
44 'only_matching': True,
49 'feed_id': 'ChQqrem0lNUp',
50 'account_id': 2269680845,
53 'feed_id': 'ChQqrem0lNUp',
54 'account_id': 2269680845,
57 'feed_id': 'L0BMHXi2no43',
58 'account_id': 2414428465,
61 'feed_id': 'ukK8o58zbRmJ',
62 'account_id': 2414429569,
65 'feed_id': '5tUJLgV2YNJ5',
66 'account_id': 2414427935,
69 'feed_id': 'tQFx_TyyEq4J',
70 'account_id': 2369613659,
73 'feed_id': '9H6qyshBZU3E',
74 'account_id': 2414426607,
78 def _real_extract(self
, url
):
79 domain
, video_id
= re
.match(self
._VALID
_URL
, url
).groups()
80 feed_info
= self
._TP
_FEEDS
[domain
.split('.')[0]]
81 return self
._extract
_feed
_info
('dtjsEC', feed_info
['feed_id'], 'byId=' + video_id
, video_id
, lambda e
: {
82 'episode_number': int_or_none(e
.get('pl1$episode')),
83 'season_number': int_or_none(e
.get('pl1$season')),
84 'series': e
.get('pl1$show'),
89 'DesktopHLS Default': {
95 }, feed_info
['account_id'])