[vlc-commits] youtube.lua: update author name extraction

Pierre Ynard git at videolan.org
Mon Aug 5 01:11:46 CEST 2013


vlc | branch: master | Pierre Ynard <linkfanel at yahoo.fr> | Mon Aug  5 01:11:35 2013 +0200| [12a302e9b5ba839b345192d375edce0a2345111e] | committer: Pierre Ynard

youtube.lua: update author name extraction

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

 share/lua/playlist/youtube.lua |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/share/lua/playlist/youtube.lua b/share/lua/playlist/youtube.lua
index 60cce81..dab4d65 100644
--- a/share/lua/playlist/youtube.lua
+++ b/share/lua/playlist/youtube.lua
@@ -165,8 +165,8 @@ function parse()
             if string.match( line, "<meta property=\"og:image\"" ) then
                 _,_,arturl = string.find( line, "content=\"(.-)\"" )
             end
-            if string.match( line, " rel=\"author\"" ) then
-                _,_,artist = string.find( line, "href=\"/user/([^\"]*)\"" )
+            if not artist then
+                artist = string.match( line, "yt%-uix%-sessionlink yt%-user%-name[^>]*>([^<]*)</" )
             end
             -- JSON parameters, also formerly known as "swfConfig",
             -- "SWF_ARGS", "swfArgs", "PLAYER_CONFIG", "playerConfig" ...



More information about the vlc-commits mailing list