diff options
Diffstat (limited to 'youtube_dl/extractor')
-rw-r--r-- | youtube_dl/extractor/__init__.py | 1 | ||||
-rw-r--r-- | youtube_dl/extractor/canal13cl.py | 32 | ||||
-rw-r--r-- | youtube_dl/extractor/common.py | 4 |
3 files changed, 37 insertions, 0 deletions
diff --git a/youtube_dl/extractor/__init__.py b/youtube_dl/extractor/__init__.py index 5a6635f8d..e6755151c 100644 --- a/youtube_dl/extractor/__init__.py +++ b/youtube_dl/extractor/__init__.py @@ -23,6 +23,7 @@ from .br import BRIE from .breakcom import BreakIE from .brightcove import BrightcoveIE from .c56 import C56IE +from .canal13cl import Canal13clIE from .canalplus import CanalplusIE from .canalc2 import Canalc2IE from .cbs import CBSIE diff --git a/youtube_dl/extractor/canal13cl.py b/youtube_dl/extractor/canal13cl.py new file mode 100644 index 000000000..781c1b503 --- /dev/null +++ b/youtube_dl/extractor/canal13cl.py @@ -0,0 +1,32 @@ +from __future__ import unicode_literals +import re + +from .common import InfoExtractor + + +class Canal13clIE(InfoExtractor): + _VALID_URL = r'^http://(?:www\.)?13\.cl/' + IE_NAME = 'Canal13cl' + + def _real_extract(self, url): + webpage = self._download_webpage(url, url) + video_id = self._html_search_regex( + r'http://streaming.13.cl/(.*)\.mp4', + webpage, u'video_id') + title = self._html_search_regex( + r'(articuloTitulo = \"(.*?)\"|(.*?)\|)', + webpage, u'title') + url = self._html_search_regex( + r'articuloVideo = \"(.*?)\"', + webpage, u'url') + thumbnail = self._html_search_regex ( + r'articuloImagen = \"(.*?)\"', + webpage, u'thumbnail') + + return { + 'video_id': video_id, + 'url': url, + 'title': title, + 'ext': 'mp4', + 'thumbnail': thumbnail + } diff --git a/youtube_dl/extractor/common.py b/youtube_dl/extractor/common.py index 84fca8ba0..080c9bdfa 100644 --- a/youtube_dl/extractor/common.py +++ b/youtube_dl/extractor/common.py @@ -88,6 +88,10 @@ class InfoExtractor(object): The following fields are optional: + display_id An alternative identifier for the video, not necessarily + unique, but available before title. Typically, id is + something like "4234987", title "Dancing naked mole rats", + and display_id "dancing-naked-mole-rats" thumbnails: A list of dictionaries (with the entries "resolution" and "url") for the varying thumbnails thumbnail: Full URL to a video thumbnail image. |