]> git.sesse.net Git - vlc/blobdiff - share/lua/playlist/youtube.lua
youtube.lua: update author name extraction
[vlc] / 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" ...