]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
[nova] Minor style improvement
authorSlava Shklyaev <shk.slava@gmail.com>
Tue, 2 Jun 2015 09:57:03 +0000 (12:57 +0300)
committerSlava Shklyaev <shk.slava@gmail.com>
Tue, 2 Jun 2015 09:57:03 +0000 (12:57 +0300)
youtube_dl/extractor/nova.py

index 140312f9c3743c43def4ca202d5c0dc03fbcb5b5..10957e5fa2c7f5674632907875033632b3144018 100644 (file)
@@ -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']