[vlc-devel] commit: lua: update the youtube script to the new version of their website (Pierre Ynard )

git version control git at videolan.org
Fri Oct 23 13:06:14 CEST 2009


vlc | branch: 1.0-bugfix | Pierre Ynard <linkfanel at yahoo.fr> | Fri Oct 23 13:03:30 2009 +0200| [9d0033e0926b6ed1e07d8ce698d13db979ff3e6e] | committer: Pierre Ynard 

lua: update the youtube script to the new version of their website
(cherry picked from commit a347ced61168256ccc11dc0ee57c607855ff6744)

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9d0033e0926b6ed1e07d8ce698d13db979ff3e6e
---

 share/lua/playlist/youtube.lua |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/share/lua/playlist/youtube.lua b/share/lua/playlist/youtube.lua
index 238d3eb..9b165e0 100644
--- a/share/lua/playlist/youtube.lua
+++ b/share/lua/playlist/youtube.lua
@@ -1,7 +1,7 @@
 --[[
  $Id$
 
- Copyright © 2007 the VideoLAN team
+ Copyright © 2007-2009 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
@@ -74,7 +74,8 @@ function parse()
             end
             -- OLD: var swfArgs = {hl:'en',BASE_YT_URL:'http://youtube.com/',video_id:'XPJ7d8dq0t8',l:'292',t:'OEgsToPDskLFdOYrrlDm3FQPoQBYaCP1',sk:'0gnr-AE6QZJEZmCMd3lq_AC'};
             -- NEW: var swfArgs = { "BASE_YT_URL": "http://youtube.com", "video_id": "OHVvVmUNBFc", "l": 88, "sk": "WswKuJzDBsdD6oG3IakCXgC", "t": "OEgsToPDskK3zO44y0QN8Fr5ZSAZwCQp", "plid": "AARGnwWMrmGkbpOxAAAA4AT4IAA", "tk": "mEL4E7PqHeaZp5OG19NQThHt9mXJU4PbRTOw6lz9osHi4Hixp7RE1w=="};
-            if string.match( line, "swfArgs" ) and string.match( line, "video_id" ) then
+            -- NEWER: 'SWF_ARGS': { [a lot of stuff...], "video_id": "OHVvVmUNBFc", "sk": "WswKuJzDBsdD6oG3IakCXgC", "t": "OEgsToPDskK3zO44y0QN8Fr5ZSAZwCQp", "plid": "AARGnwWMrmGkbpOxAAAA4AT4IAA"};
+            if ( string.match( line, "SWF_ARGS" ) or string.match( line, "swfArgs" ) ) and string.match( line, "video_id" ) then
                 if string.match( line, "BASE_YT_URL" ) then
                     _,_,base_yt_url = string.find( line, "\"BASE_YT_URL\": \"(.-)\"" )
                 end




More information about the vlc-devel mailing list