[vlc-commits] youtube.lua: update parsing for new signature parameters' name
    Pierre Ynard 
    git at videolan.org
       
    Sat May 30 11:34:29 CEST 2020
    
    
  
vlc/vlc-3.0 | branch: master | Pierre Ynard <linkfanel at yahoo.fr> | Sat May 30 11:19:20 2020 +0200| [e039fcaca21024e29247664cc3c44e8041ef48c5] | committer: Pierre Ynard
youtube.lua: update parsing for new signature parameters' name
(cherry picked from commit 8ed74ac70f6b5452938e07f80cf158aa13e4e666)
Signed-off-by: Pierre Ynard <linkfanel at yahoo.fr>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=e039fcaca21024e29247664cc3c44e8041ef48c5
---
 share/lua/playlist/youtube.lua | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/share/lua/playlist/youtube.lua b/share/lua/playlist/youtube.lua
index 255af3f2e9..753f5c5f4e 100644
--- a/share/lua/playlist/youtube.lua
+++ b/share/lua/playlist/youtube.lua
@@ -270,9 +270,10 @@ function pick_stream( stream_map, js_url )
         return nil
     end
 
-    -- Either the "url" or the "cipher" parameter is present,
+    -- Either the "url" or the "signatureCipher" parameter is present,
     -- depending on whether the URL signature is scrambled.
-    local cipher = string.match( pick, '"cipher":"(.-)"' )
+    local cipher = string.match( pick, '"signatureCipher":"(.-)"' )
+        or string.match( pick, '"%a*[Cc]ipher":"(.-)"' )
     if cipher then
         -- Scrambled signature: some assembly required
         local url = stream_url( cipher, js_url )
    
    
More information about the vlc-commits
mailing list