]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
[youtube] Fix extraction (closes #11663, #11664)
authorSergey M․ <dstftw@gmail.com>
Tue, 10 Jan 2017 14:25:29 +0000 (21:25 +0700)
committerSergey M․ <dstftw@gmail.com>
Tue, 10 Jan 2017 14:25:29 +0000 (21:25 +0700)
youtube_dl/jsinterp.py

index a8df4aef0a2553222d45b9f38131a2945470d412..24cdec28c6cb2332232212d6bcf39d03edc27c7a 100644 (file)
@@ -213,7 +213,7 @@ class JSInterpreter(object):
     def extract_object(self, objname):
         obj = {}
         obj_m = re.search(
-            (r'(?:var\s+)?%s\s*=\s*\{' % re.escape(objname)) +
+            (r'(?<!this\.)%s\s*=\s*\{' % re.escape(objname)) +
             r'\s*(?P<fields>([a-zA-Z$0-9]+\s*:\s*function\(.*?\)\s*\{.*?\}(?:,\s*)?)*)' +
             r'\}\s*;',
             self.code)