]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
[jsinterp] Adapt to updated YouTube code generation (Fixes #7623, fixes #7624, fixes...
authorPhilipp Hagemeister <phihag@phihag.de>
Tue, 24 Nov 2015 06:45:02 +0000 (07:45 +0100)
committerPhilipp Hagemeister <phihag@phihag.de>
Tue, 24 Nov 2015 06:45:38 +0000 (07:45 +0100)
youtube_dl/jsinterp.py

index 9bc8551441cb7faf0cfb58fddc25f2183dc6da00..2191e8b8956563830245b574702dc68e6a3b8dbd 100644 (file)
@@ -214,7 +214,7 @@ class JSInterpreter(object):
         obj = {}
         obj_m = re.search(
             (r'(?:var\s+)?%s\s*=\s*\{' % re.escape(objname)) +
-            r'\s*(?P<fields>([a-zA-Z$0-9]+\s*:\s*function\(.*?\)\s*\{.*?\})*)' +
+            r'\s*(?P<fields>([a-zA-Z$0-9]+\s*:\s*function\(.*?\)\s*\{.*?\}(?:,\s*)?)*)' +
             r'\}\s*;',
             self.code)
         fields = obj_m.group('fields')