2014-03-03 02:14:19 +00:00
|
|
|
from __future__ import unicode_literals
|
|
|
|
import re
|
|
|
|
|
|
|
|
from .common import InfoExtractor
|
|
|
|
|
|
|
|
|
|
|
|
class Canal13clIE(InfoExtractor):
|
2014-03-03 02:41:13 +00:00
|
|
|
_VALID_URL = r'^http://(?:www\.)?13\.cl/'
|
2014-03-03 02:14:19 +00:00
|
|
|
IE_NAME = 'Canal13cl'
|
|
|
|
|
|
|
|
def _real_extract(self, url):
|
2014-03-03 02:41:13 +00:00
|
|
|
webpage = self._download_webpage(url, url)
|
|
|
|
video_id = self._html_search_regex(
|
|
|
|
r'http://streaming.13.cl/(.*)\.mp4',
|
|
|
|
webpage, u'video_id')
|
2014-03-03 02:14:19 +00:00
|
|
|
title = self._html_search_regex(
|
2014-03-03 02:41:13 +00:00
|
|
|
r'(articuloTitulo = \"(.*?)\"|(.*?)\|)',
|
2014-03-03 02:14:19 +00:00
|
|
|
webpage, u'title')
|
|
|
|
url = self._html_search_regex(
|
2014-03-03 02:41:13 +00:00
|
|
|
r'articuloVideo = \"(.*?)\"',
|
2014-03-03 02:14:19 +00:00
|
|
|
webpage, u'url')
|
|
|
|
thumbnail = self._html_search_regex (
|
2014-03-03 02:41:13 +00:00
|
|
|
r'articuloImagen = \"(.*?)\"',
|
2014-03-03 02:14:19 +00:00
|
|
|
webpage, u'thumbnail')
|
|
|
|
|
|
|
|
return {
|
2014-03-03 02:41:13 +00:00
|
|
|
'video_id': video_id,
|
2014-03-03 02:14:19 +00:00
|
|
|
'url': url,
|
|
|
|
'title': title,
|
|
|
|
'ext': 'mp4',
|
|
|
|
'thumbnail': thumbnail
|
|
|
|
}
|