diff options
| author | Juan C. Olivares <cristobal@cxsoftware.com> | 2014-03-02 23:41:13 -0300 | 
|---|---|---|
| committer | Juan C. Olivares <cristobal@cxsoftware.com> | 2014-03-02 23:41:13 -0300 | 
| commit | 409a16cb7220380b0f62efca4a61546e6a6bcfe2 (patch) | |
| tree | cc3b5571fb6aa6fcee75318798a519663369ad60 | |
| parent | 94d5e90b4f9d79970d88e263a5c962e63f9b13b5 (diff) | |
Allowing URLs for 13.cl without the /programas prefix
| -rw-r--r-- | youtube_dl/extractor/canal13cl.py | 14 | 
1 files changed, 9 insertions, 5 deletions
diff --git a/youtube_dl/extractor/canal13cl.py b/youtube_dl/extractor/canal13cl.py index 3b4c7cdb7..781c1b503 100644 --- a/youtube_dl/extractor/canal13cl.py +++ b/youtube_dl/extractor/canal13cl.py @@ -5,22 +5,26 @@ from .common import InfoExtractor  class Canal13clIE(InfoExtractor): -    _VALID_URL = r'^http://(?:www\.)?13\.cl/programa/' +    _VALID_URL = r'^http://(?:www\.)?13\.cl/'      IE_NAME = 'Canal13cl'      def _real_extract(self, url): -        webpage = self._download_webpage(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 = \'(.*?)\'', +            r'(articuloTitulo = \"(.*?)\"|(.*?)\|)',              webpage, u'title')          url = self._html_search_regex( -            r'articuloVideo = \'(.*?)\'', +            r'articuloVideo = \"(.*?)\"',              webpage, u'url')          thumbnail = self._html_search_regex ( -            r'articuloImagen = \'(.*?)\'', +            r'articuloImagen = \"(.*?)\"',              webpage, u'thumbnail')          return { +            'video_id': video_id,              'url': url,              'title': title,              'ext': 'mp4',  | 
