1
0
Fork 0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2024-11-21 17:51:51 +00:00

[youtube] Fix extraction (closes #11663, #11664)

This commit is contained in:
Sergey M․ 2017-01-10 21:25:29 +07:00
parent 366b759a60
commit d1aeacd9bf
No known key found for this signature in database
GPG key ID: 2C393E0F18A9236D

View file

@ -213,7 +213,7 @@ class JSInterpreter(object):
def extract_object(self, objname): def extract_object(self, objname):
obj = {} obj = {}
obj_m = re.search( 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*(?P<fields>([a-zA-Z$0-9]+\s*:\s*function\(.*?\)\s*\{.*?\}(?:,\s*)?)*)' +
r'\}\s*;', r'\}\s*;',
self.code) self.code)