]> Raphaƫl G. Git Repositories - youtubedl/blob - debian/patches/fix_youtube_extraction.patch
e3ba6e58c5bb1e8d62ea56d575a6e668fb56579a
[youtubedl] / debian / patches / fix_youtube_extraction.patch
1 From d1aeacd9bfe12bdf064d8888f77ccf8bd30f1723 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Sergey=20M=E2=80=A4?= <dstftw@gmail.com>
3 Date: Tue, 10 Jan 2017 21:25:29 +0700
4 Subject: [PATCH] [youtube] Fix extraction (closes #11663, #11664)
5
6 ---
7 youtube_dl/jsinterp.py | 2 +-
8 1 file changed, 1 insertion(+), 1 deletion(-)
9
10 diff --git a/youtube_dl/jsinterp.py b/youtube_dl/jsinterp.py
11 index a8df4ae..24cdec2 100644
12 --- a/youtube_dl/jsinterp.py
13 +++ b/youtube_dl/jsinterp.py
14 @@ -213,7 +213,7 @@ def interpret_expression(self, expr, local_vars, allow_recursion):
15 def extract_object(self, objname):
16 obj = {}
17 obj_m = re.search(
18 - (r'(?:var\s+)?%s\s*=\s*\{' % re.escape(objname)) +
19 + (r'(?<!this\.)%s\s*=\s*\{' % re.escape(objname)) +
20 r'\s*(?P<fields>([a-zA-Z$0-9]+\s*:\s*function\(.*?\)\s*\{.*?\}(?:,\s*)?)*)' +
21 r'\}\s*;',
22 self.code)