]> git.sesse.net Git - vlc/commitdiff
youtube.lua: update author name extraction
authorPierre Ynard <linkfanel@yahoo.fr>
Sun, 4 Aug 2013 23:11:35 +0000 (01:11 +0200)
committerPierre Ynard <linkfanel@yahoo.fr>
Sun, 4 Aug 2013 23:11:35 +0000 (01:11 +0200)
share/lua/playlist/youtube.lua

index 60cce81af27448472a0a5041ad85d0d3631482f8..dab4d6585d7f30f81a1fe43b88fe5eb7960616d4 100644 (file)
@@ -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" ...