diff --git a/share/lua/playlist/youtube.lua b/share/lua/playlist/youtube.lua index 65c81514d18aaee82aff53baa88e689db013eefd..7b339a02fc83be07e5a24b44393598450b05466c 100644 --- a/share/lua/playlist/youtube.lua +++ b/share/lua/playlist/youtube.lua @@ -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