[vlc-commits] [Git][videolan/vlc][master] youtube.lua - js_descramble function name return fix: the string pattern match...

Hugo Beauzée-Luyssen (@chouquette) gitlab at videolan.org
Sat Sep 4 08:24:23 UTC 2021



Hugo Beauzée-Luyssen pushed to branch master at VideoLAN / VLC


Commits:
c05eb00c by Kung Lao at 2021-09-04T07:57:17+00:00
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)
- - - - -


1 changed file:

- share/lua/playlist/youtube.lua


Changes:

=====================================
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



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/c05eb00c25168f4693e09cb8fc1a8f2490883af6

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/c05eb00c25168f4693e09cb8fc1a8f2490883af6
You're receiving this email because of your account on code.videolan.org.




More information about the vlc-commits mailing list