vlc | branch: master | Pierre Ynard <[email protected]> | Thu Jan 23 22:10:35 2020 +0100| [8bbb13419d4bc5505cb75416d5b8049142a27358] | committer: Pierre Ynard
youtube.lua: update signature descrambling javascript parsing The signature descrambling call changed to using several steps with intermediate variables. We know that the signature field must be URL-decoded before descrambling, so we now rely on that. > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8bbb13419d4bc5505cb75416d5b8049142a27358 --- share/lua/playlist/youtube.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/share/lua/playlist/youtube.lua b/share/lua/playlist/youtube.lua index 963dff754c..255af3f2e9 100644 --- a/share/lua/playlist/youtube.lua +++ b/share/lua/playlist/youtube.lua @@ -1,7 +1,7 @@ --[[ $Id$ - Copyright © 2007-2019 the VideoLAN team + Copyright © 2007-2020 the VideoLAN team This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -107,11 +107,11 @@ function js_descramble( sig, js_url ) end -- Look for the descrambler function's name - -- k.s&&f.set(k.sp,encodeURIComponent(DK(decodeURIComponent(k.s)))); + -- if(k.s){var l=k.sp,m=pt(decodeURIComponent(k.s));f.set(l,encodeURIComponent(m))} -- 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" or "sig") to set with the output, descrambled signature - local descrambler = js_extract( js, "%.set%([^,]-%.sp,[^;]-%((..)%(" ) + local descrambler = js_extract( js, "[=%(,&|](..)%(decodeURIComponent%(.%.s%)%)" ) if not descrambler then vlc.msg.dbg( "Couldn't extract youtube video URL signature descrambling function name" ) return sig _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
