Browse Source

[screenwavemedia] Fix extraction (Closes #6575)

Sergey M․ 10 years ago
parent
commit
7fc18d9309
1 changed files with 14 additions and 9 deletions
  1. 14 9
      youtube_dl/extractor/screenwavemedia.py

+ 14 - 9
youtube_dl/extractor/screenwavemedia.py

@@ -1,6 +1,8 @@
 # encoding: utf-8
 # encoding: utf-8
 from __future__ import unicode_literals
 from __future__ import unicode_literals
 
 
+import re
+
 from .common import InfoExtractor
 from .common import InfoExtractor
 from ..utils import (
 from ..utils import (
     int_or_none,
     int_or_none,
@@ -35,15 +37,18 @@ class ScreenwaveMediaIE(InfoExtractor):
 
 
         sources = self._parse_json(
         sources = self._parse_json(
             js_to_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
             video_id