diff options
author | Rogério Brito <rbrito@ime.usp.br> | 2016-08-17 09:19:41 -0300 |
---|---|---|
committer | Rogério Brito <rbrito@ime.usp.br> | 2016-08-17 09:19:41 -0300 |
commit | ced7488f6d3a519b2c1b1cbd31048743fb8285bd (patch) | |
tree | 868396b5d0031b626ea3e2ef822dad6430d70c67 /youtube_dl/extractor/ctv.py | |
parent | 9dc487f48b50767cf540fa36c3de2c386fd74c04 (diff) | |
download | youtube-dl-ced7488f6d3a519b2c1b1cbd31048743fb8285bd.zip youtube-dl-ced7488f6d3a519b2c1b1cbd31048743fb8285bd.tar.gz youtube-dl-ced7488f6d3a519b2c1b1cbd31048743fb8285bd.tar.bz2 |
Imported Upstream version 2016.08.17
Diffstat (limited to 'youtube_dl/extractor/ctv.py')
-rw-r--r-- | youtube_dl/extractor/ctv.py | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/youtube_dl/extractor/ctv.py b/youtube_dl/extractor/ctv.py new file mode 100644 index 0000000..5807fba --- /dev/null +++ b/youtube_dl/extractor/ctv.py @@ -0,0 +1,30 @@ +# coding: utf-8 +from __future__ import unicode_literals + +from .common import InfoExtractor + + +class CTVIE(InfoExtractor): + _VALID_URL = r'https?://(?:www\.)?ctv\.ca/video/player\?vid=(?P<id>[0-9.]+)' + _TESTS = [{ + 'url': 'http://www.ctv.ca/video/player?vid=706966', + 'md5': 'ff2ebbeae0aa2dcc32a830c3fd69b7b0', + 'info_dict': { + 'id': '706966', + 'ext': 'mp4', + 'title': 'Larry Day and Richard Jutras on the TIFF red carpet of \'Stonewall\'', + 'description': 'etalk catches up with Larry Day and Richard Jutras on the TIFF red carpet of "Stonewall”.', + 'upload_date': '20150919', + 'timestamp': 1442624700, + }, + 'expected_warnings': ['HTTP Error 404'], + }] + + def _real_extract(self, url): + video_id = self._match_id(url) + return { + '_type': 'url_transparent', + 'id': video_id, + 'url': '9c9media:ctv_web:%s' % video_id, + 'ie_key': 'NineCNineMedia', + } |