[vlc-commits] youtube.lua: fix signature descrambling function pattern

Pierre Ynard git at videolan.org
Sat Jan 31 11:29:07 CET 2015


vlc/vlc-2.2 | branch: master | Pierre Ynard <linkfanel at yahoo.fr> | Sat Jan 31 10:28:45 2015 +0100| [ce51ba402542d62abd6929fed42aa0d772066a24] | committer: Felix Paul Kühne

youtube.lua: fix signature descrambling function pattern

It doesn't support special characters like $, which happen to be used.

(cherry picked from commit 457b73154ab210737acb68673830244e07b587e9)
Signed-off-by: Felix Paul Kühne <fkuehne at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=ce51ba402542d62abd6929fed42aa0d772066a24
---

 share/lua/playlist/youtube.lua |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/share/lua/playlist/youtube.lua b/share/lua/playlist/youtube.lua
index 2b7d40c..ada99ac 100644
--- a/share/lua/playlist/youtube.lua
+++ b/share/lua/playlist/youtube.lua
@@ -88,10 +88,8 @@ function js_descramble( sig, js_url )
         -- Buffer lines for later, so we don't have to make a second
         -- HTTP request later
         table.insert( lines, line )
-        -- c&&(b.signature=ij(c));
-        -- descrambler = string.match( line, "%.signature=(.-)%(" )
-        -- descrambler = string.match( line, "%.sig%|%|(.-)%(" )
-        descrambler = string.match( line, "%.sig||([a-zA-Z0-9]+)%(" )
+        -- c&&a.set("signature",br(c));
+        descrambler = string.match( line, "%.set%(\"signature\",(.-)%(" )
     end
 
     -- Fetch the code of the descrambler function. The function is



More information about the vlc-commits mailing list