[arte] Mark dead code as such
authorPhilipp Hagemeister <phihag@phihag.de>
Sun, 23 Jun 2013 18:26:35 +0000 (20:26 +0200)
committerPhilipp Hagemeister <phihag@phihag.de>
Sun, 23 Jun 2013 18:26:35 +0000 (20:26 +0200)
youtube_dl/extractor/arte.py

index 48f7494605f7cb29018248dcad3aab97029fc80c..82e3ffe04312d27abb5865a48ccdc69075afbc6f 100644 (file)
@@ -48,31 +48,32 @@ class ArteTvIE(InfoExtractor):
 
         return info
 
-    def extractLiveStream(self, url):
-        video_lang = url.split('/')[-4]
-        info = self.grep_webpage(
-            url,
-            r'src="(.*?/videothek_js.*?\.js)',
-            0,
-            [
-                (1, 'url', u'Invalid URL: %s' % url)
-            ]
-        )
-        http_host = url.split('/')[2]
-        next_url = 'http://%s%s' % (http_host, compat_urllib_parse.unquote(info.get('url')))
-        info = self.grep_webpage(
-            next_url,
-            r'(s_artestras_scst_geoFRDE_' + video_lang + '.*?)\'.*?' +
-                '(http://.*?\.swf).*?' +
-                '(rtmp://.*?)\'',
-            re.DOTALL,
-            [
-                (1, 'path',   u'could not extract video path: %s' % url),
-                (2, 'player', u'could not extract video player: %s' % url),
-                (3, 'url',    u'could not extract video url: %s' % url)
-            ]
-        )
-        video_url = u'%s/%s' % (info.get('url'), info.get('path'))
+    # TODO implement Live Stream
+    # def extractLiveStream(self, url):
+    #     video_lang = url.split('/')[-4]
+    #     info = self.grep_webpage(
+    #         url,
+    #         r'src="(.*?/videothek_js.*?\.js)',
+    #         0,
+    #         [
+    #             (1, 'url', u'Invalid URL: %s' % url)
+    #         ]
+    #     )
+    #     http_host = url.split('/')[2]
+    #     next_url = 'http://%s%s' % (http_host, compat_urllib_parse.unquote(info.get('url')))
+    #     info = self.grep_webpage(
+    #         next_url,
+    #         r'(s_artestras_scst_geoFRDE_' + video_lang + '.*?)\'.*?' +
+    #             '(http://.*?\.swf).*?' +
+    #             '(rtmp://.*?)\'',
+    #         re.DOTALL,
+    #         [
+    #             (1, 'path',   u'could not extract video path: %s' % url),
+    #             (2, 'player', u'could not extract video player: %s' % url),
+    #             (3, 'url',    u'could not extract video url: %s' % url)
+    #         ]
+    #     )
+    #     video_url = u'%s/%s' % (info.get('url'), info.get('path'))
 
     def extractPlus7Stream(self, url):
         video_lang = url.split('/')[-3]
@@ -126,8 +127,9 @@ class ArteTvIE(InfoExtractor):
         self.report_extraction(video_id)
 
         if re.search(self._LIVE_URL, video_id) is not None:
-            self.extractLiveStream(url)
-            return
+            raise ExtractorError(u'Arte live streams are not yet supported, sorry')
+            # self.extractLiveStream(url)
+            # return
         else:
             info = self.extractPlus7Stream(url)