Skip to content
Snippets Groups Projects
Commit c05eb00c authored by Kung Lao's avatar Kung Lao Committed by Hugo Beauzée-Luyssen
Browse files

youtube.lua - js_descramble function name return fix: the string pattern match...

youtube.lua - js_descramble function name return fix: the string pattern match now returns 2 or 3 char length function names. Issue ref: #25988, #25995 (closed)
parent 8e127ccd
No related branches found
No related tags found
1 merge request!560youtube.lua - js_descramble function name return fix: the string pattern match...
Pipeline #134385 passed with stage
in 14 minutes and 49 seconds
......@@ -124,10 +124,12 @@ function js_descramble( sig, js_url )
-- Look for the descrambler function's name
-- if(k.s){var l=k.sp,m=pt(decodeURIComponent(k.s));f.set(l,encodeURIComponent(m))}
-- Descrambler function name - 3 chars length
-- if(h.s){var l=h.sp,m=wja(decodeURIComponent(h.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, "[=%(,&|](..)%(decodeURIComponent%(.%.s%)%)" )
local descrambler = js_extract( js, "[=%(,&|](%a?%a?%a?)%(decodeURIComponent%(.%.s%)%)" )
if not descrambler then
vlc.msg.dbg( "Couldn't extract youtube video URL signature descrambling function name" )
return sig
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment