projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
366b759
)
[youtube] Fix extraction (closes #11663, #11664)
author
Sergey M․
<dstftw@gmail.com>
Tue, 10 Jan 2017 14:25:29 +0000
(21:25 +0700)
committer
Sergey M․
<dstftw@gmail.com>
Tue, 10 Jan 2017 14:25:29 +0000
(21:25 +0700)
youtube_dl/jsinterp.py
patch
|
blob
|
history
diff --git
a/youtube_dl/jsinterp.py
b/youtube_dl/jsinterp.py
index a8df4aef0a2553222d45b9f38131a2945470d412..24cdec28c6cb2332232212d6bcf39d03edc27c7a 100644
(file)
--- 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)