1
0
mirror of https://github.com/l1ving/youtube-dl synced 2024-11-24 14:53:21 +08:00
youtube-dl/youtube_dl/extractor/canal13cl.py

29 lines
773 B
Python
Raw Normal View History

2014-03-03 10:14:19 +08:00
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
}