From 2d73b4580583dfefd80cfd39c0c8de11b1bb30ee Mon Sep 17 00:00:00 2001 From: "Juan C. Olivares" Date: Sun, 2 Mar 2014 23:14:19 -0300 Subject: [PATCH] Adding support for 13.cl --- youtube_dl/extractor/__init__.py | 1 + youtube_dl/extractor/canal13cl.py | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 youtube_dl/extractor/canal13cl.py diff --git a/youtube_dl/extractor/__init__.py b/youtube_dl/extractor/__init__.py index 5a6635f8d..7f93f112f 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 Canal13cslIE 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..3b4c7cdb7 --- /dev/null +++ b/youtube_dl/extractor/canal13cl.py @@ -0,0 +1,28 @@ +from __future__ import unicode_literals +import re + +from .common import InfoExtractor + + +class Canal13clIE(InfoExtractor): + _VALID_URL = r'^http://(?:www\.)?13\.cl/programa/' + IE_NAME = 'Canal13cl' + + def _real_extract(self, url): + webpage = self._download_webpage(url) + 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 { + 'url': url, + 'title': title, + 'ext': 'mp4', + 'thumbnail': thumbnail + } -- 2.39.5