aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/corus.py
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2017-06-13 23:15:06 +0700
committerSergey M․ <dstftw@gmail.com>2017-06-13 23:16:21 +0700
commit97fa1f8dc4df553624b76a3da2b00edc47744a16 (patch)
tree863465d49913b6e3779516ed27a92b166e8a4243 /youtube_dl/extractor/corus.py
parentb081f53b08e791d9e688bfa1a17caf3bb3630693 (diff)
downloadyoutube-dl-97fa1f8dc4df553624b76a3da2b00edc47744a16.tar.xz
[corus] Add support for history.ca (closes #13359)
Diffstat (limited to 'youtube_dl/extractor/corus.py')
-rw-r--r--youtube_dl/extractor/corus.py18
1 files changed, 17 insertions, 1 deletions
diff --git a/youtube_dl/extractor/corus.py b/youtube_dl/extractor/corus.py
index 7b2f5008b..9cdd34636 100644
--- a/youtube_dl/extractor/corus.py
+++ b/youtube_dl/extractor/corus.py
@@ -8,7 +8,16 @@ from ..utils import int_or_none
class CorusIE(ThePlatformFeedIE):
- _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+)'
+ _VALID_URL = r'''(?x)
+ https?://
+ (?:www\.)?
+ (?P<domain>
+ (?:globaltv|etcanada)\.com|
+ (?:hgtv|foodnetwork|slice|history)\.ca
+ )
+ /(?:video/|(?:[^/]+/)+(?:videos/[a-z0-9-]+-|video\.html\?.*?\bv=))
+ (?P<id>\d+)
+ '''
_TESTS = [{
'url': 'http://www.hgtv.ca/shows/bryan-inc/videos/movie-night-popcorn-with-bryan-870923331648/',
'md5': '05dcbca777bf1e58c2acbb57168ad3a6',
@@ -27,6 +36,9 @@ class CorusIE(ThePlatformFeedIE):
}, {
'url': 'http://etcanada.com/video/873675331955/meet-the-survivor-game-changers-castaways-part-2/',
'only_matching': True,
+ }, {
+ 'url': 'http://www.history.ca/the-world-without-canada/video/full-episodes/natural-resources/video.html?v=955054659646#video',
+ 'only_matching': True,
}]
_TP_FEEDS = {
@@ -50,6 +62,10 @@ class CorusIE(ThePlatformFeedIE):
'feed_id': '5tUJLgV2YNJ5',
'account_id': 2414427935,
},
+ 'history': {
+ 'feed_id': 'tQFx_TyyEq4J',
+ 'account_id': 2369613659,
+ },
}
def _real_extract(self, url):