[screenwavemedia] Fix extraction (Closes #6575)
authorSergey M․ <dstftw@gmail.com>
Sun, 16 Aug 2015 13:53:14 +0000 (19:53 +0600)
committerSergey M․ <dstftw@gmail.com>
Sun, 16 Aug 2015 13:53:14 +0000 (19:53 +0600)
youtube_dl/extractor/screenwavemedia.py

index 3bc84989e2b4d4c842714a1d815070eeb05e45c9..78b068be2828b40e2f8a6c666f2176b260521b9b 100644 (file)
@@ -1,6 +1,8 @@
 # encoding: utf-8
 from __future__ import unicode_literals
 
+import re
+
 from .common import InfoExtractor
 from ..utils import (
     int_or_none,
@@ -35,15 +37,18 @@ class ScreenwaveMediaIE(InfoExtractor):
 
         sources = self._parse_json(
             js_to_json(
-                self._search_regex(
-                    r"sources\s*:\s*(\[[^\]]+?\])", playerconfig,
-                    'sources',
-                ).replace(
-                    "' + thisObj.options.videoserver + '",
-                    videoserver
-                ).replace(
-                    "' + playerVidId + '",
-                    video_id
+                re.sub(
+                    r'(?s)/\*.*?\*/', '',
+                    self._search_regex(
+                        r"sources\s*:\s*(\[[^\]]+?\])", playerconfig,
+                        'sources',
+                    ).replace(
+                        "' + thisObj.options.videoserver + '",
+                        videoserver
+                    ).replace(
+                        "' + playerVidId + '",
+                        video_id
+                    )
                 )
             ),
             video_id