瀏覽代碼

[nova] Minor style improvement

Slava Shklyaev 10 年之前
父節點
當前提交
a00234f1c5
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      youtube_dl/extractor/nova.py

+ 1 - 1
youtube_dl/extractor/nova.py

@@ -132,7 +132,7 @@ class NovaIE(InfoExtractor):
         config = self._download_json(
             config_url, display_id,
             'Downloading config JSON',
-            transform_source=lambda s: re.sub(r'var\s+[\da-zA-Z_]+\s*=\s*({.+?});', r'\1', s))
+            transform_source=lambda s: s[s.index('{'):s.rindex('}') + 1])
 
         mediafile = config['mediafile']
         video_url = mediafile['src']