Adding support for 13.cl
[youtube-dl] / youtube_dl / extractor / canal13cl.py
1 from __future__ import unicode_literals
2 import re
3
4 from .common import InfoExtractor
5
6
7 class Canal13clIE(InfoExtractor):
8     _VALID_URL = r'^http://(?:www\.)?13\.cl/programa/'
9     IE_NAME = 'Canal13cl'
10
11     def _real_extract(self, url):
12         webpage = self._download_webpage(url)
13         title = self._html_search_regex(
14             r'articuloTitulo = \'(.*?)\'',
15             webpage, u'title')
16         url = self._html_search_regex(
17             r'articuloVideo = \'(.*?)\'',
18             webpage, u'url')
19         thumbnail = self._html_search_regex (
20             r'articuloImagen = \'(.*?)\'',
21             webpage, u'thumbnail')
22
23         return {
24             'url': url,
25             'title': title,
26             'ext': 'mp4',
27             'thumbnail': thumbnail
28         }