]> git.sesse.net Git - vlc/commitdiff
youtube.lua: fix signature descrambling function pattern
authorPierre Ynard <linkfanel@yahoo.fr>
Sat, 31 Jan 2015 09:28:45 +0000 (10:28 +0100)
committerPierre Ynard <linkfanel@yahoo.fr>
Sat, 31 Jan 2015 09:28:45 +0000 (10:28 +0100)
It doesn't support special characters like $, which happen to be used.

share/lua/playlist/youtube.lua

index 2b7d40c71cbe417b2fe9f7db4131a55dd9eabc36..ada99ac1c5b4e5b2799ca783a18d055baa0180df 100644 (file)
@@ -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