]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
Adding support for 13.cl
authorJuan C. Olivares <cristobal@cxsoftware.com>
Mon, 3 Mar 2014 02:14:19 +0000 (23:14 -0300)
committerJuan C. Olivares <cristobal@cxsoftware.com>
Mon, 3 Mar 2014 02:15:12 +0000 (23:15 -0300)
youtube_dl/extractor/__init__.py
youtube_dl/extractor/canal13cl.py [new file with mode: 0644]

index 5a6635f8db9638751782e191c89ced242e2e8f5a..7f93f112fc273c6c6b9a4c23fc40088d4f0cd222 100644 (file)
@@ -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 (file)
index 0000000..3b4c7cd
--- /dev/null
@@ -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
+        }