[vlc-commits] youtube.lua: update signature descrambling javascript parsing
Pierre Ynard
git at videolan.org
Thu Nov 8 19:49:53 CET 2018
vlc/vlc-3.0 | branch: master | Pierre Ynard <linkfanel at yahoo.fr> | Thu Nov 8 19:38:23 2018 +0100| [cc46bdfc48b5b8c969890af02154c3f77d43f59d] | committer: Pierre Ynard
youtube.lua: update signature descrambling javascript parsing
Signature descrambling call is now wrapped in URL decoding/encoding
calls.
(cherry picked from commit d07058575cb4fbb9f6f3aa5b02cda13e2f5983ef)
Signed-off-by: Pierre Ynard <linkfanel at yahoo.fr>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=cc46bdfc48b5b8c969890af02154c3f77d43f59d
---
share/lua/playlist/youtube.lua | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/share/lua/playlist/youtube.lua b/share/lua/playlist/youtube.lua
index baf2002a18..ab2a1ecaf4 100644
--- a/share/lua/playlist/youtube.lua
+++ b/share/lua/playlist/youtube.lua
@@ -107,11 +107,11 @@ function js_descramble( sig, js_url )
end
-- Look for the descrambler function's name
- -- k.s&&f.set(k.sp,DK(k.s));
+ -- k.s&&f.set(k.sp,(0,window.encodeURIComponent)(DK((0,window.decodeURIComponent)(k.s))));
-- k.s (from stream map field "s") holds the input scrambled signature
-- k.sp (from stream map field "sp") holds a parameter name (normally
-- "signature") to set with the output, descrambled signature
- local descrambler = js_extract( js, "%.set%([^,]-%.sp,([^)]-)%(" )
+ local descrambler = js_extract( js, "%.set%([^,]-%.sp,[^;]-%((..)%(" )
if not descrambler then
vlc.msg.dbg( "Couldn't extract youtube video URL signature descrambling function name" )
return sig
More information about the vlc-commits
mailing list