aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2017-01-10 21:25:29 +0700
committerSergey M․ <dstftw@gmail.com>2017-01-10 21:25:29 +0700
commitd1aeacd9bfe12bdf064d8888f77ccf8bd30f1723 (patch)
tree41f9727e15eb9efc85822cccc9828071d4758a4f
parent366b759a60d0875ebd322e1cdf389a589ac23c71 (diff)
[youtube] Fix extraction (closes #11663, #11664)
-rw-r--r--youtube_dl/jsinterp.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/youtube_dl/jsinterp.py b/youtube_dl/jsinterp.py
index a8df4aef0..24cdec28c 100644
--- a/youtube_dl/jsinterp.py
+++ b/youtube_dl/jsinterp.py
@@ -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)