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

Pierre Ynard git at videolan.org
Mon Aug 5 09:51:01 CEST 2013


vlc/vlc-2.1 | branch: master | Pierre Ynard <linkfanel at yahoo.fr> | Mon Aug  5 01:11:35 2013 +0200| [e9b9207a80e3dd7397c443766666ad6c05fd0843] | committer: Jean-Baptiste Kempf

youtube.lua: update author name extraction

(cherry picked from commit 12a302e9b5ba839b345192d375edce0a2345111e)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 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