]> Raphaël G. Git Repositories - youtubedl/commitdiff
debian/patches: Add patch from upstream to fix extraction from youtube.
authorRogério Brito <rbrito@ime.usp.br>
Thu, 12 Jan 2017 15:56:58 +0000 (13:56 -0200)
committerRogério Brito <rbrito@ime.usp.br>
Thu, 12 Jan 2017 15:56:58 +0000 (13:56 -0200)
Closes: #850893, #851157
debian/patches/fix_youtube_extraction.patch [new file with mode: 0644]
debian/patches/series

diff --git a/debian/patches/fix_youtube_extraction.patch b/debian/patches/fix_youtube_extraction.patch
new file mode 100644 (file)
index 0000000..e3ba6e5
--- /dev/null
@@ -0,0 +1,22 @@
+From d1aeacd9bfe12bdf064d8888f77ccf8bd30f1723 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Sergey=20M=E2=80=A4?= <dstftw@gmail.com>
+Date: Tue, 10 Jan 2017 21:25:29 +0700
+Subject: [PATCH] [youtube] Fix extraction (closes #11663, #11664)
+
+---
+ youtube_dl/jsinterp.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/youtube_dl/jsinterp.py b/youtube_dl/jsinterp.py
+index a8df4ae..24cdec2 100644
+--- a/youtube_dl/jsinterp.py
++++ b/youtube_dl/jsinterp.py
+@@ -213,7 +213,7 @@ def interpret_expression(self, expr, local_vars, allow_recursion):
+     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)
index 21895fb7dc6ad85f4c2ecb6cf373204cb74da4f6..43a336f63f4c9dbe329d6d1bf13780b9433a483a 100644 (file)
@@ -1,2 +1,3 @@
 skip_support_file_installation.patch
 fix_libav_compat_outdated.patch
+fix_youtube_extraction.patch