Commit 5c34cc1e authored by Pierre Ynard's avatar Pierre Ynard

youtube.lua: fix encoded characters in author name (web page)

Characters with accents are not encoded, but apostrophes happen
parent 62605f27
...@@ -165,8 +165,13 @@ function parse() ...@@ -165,8 +165,13 @@ function parse()
if string.match( line, "<meta property=\"og:image\"" ) then if string.match( line, "<meta property=\"og:image\"" ) then
_,_,arturl = string.find( line, "content=\"(.-)\"" ) _,_,arturl = string.find( line, "content=\"(.-)\"" )
end end
-- This is not available in the video parameters (whereas it
-- is given by the get_video_info API as the "author" field)
if not artist then if not artist then
artist = string.match( line, "yt%-uix%-sessionlink yt%-user%-name[^>]*>([^<]*)</" ) artist = string.match( line, "yt%-uix%-sessionlink yt%-user%-name[^>]*>([^<]*)</" )
if artist then
artist = vlc.strings.resolve_xml_special_chars( artist )
end
end end
-- JSON parameters, also formerly known as "swfConfig", -- JSON parameters, also formerly known as "swfConfig",
-- "SWF_ARGS", "swfArgs", "PLAYER_CONFIG", "playerConfig" ... -- "SWF_ARGS", "swfArgs", "PLAYER_CONFIG", "playerConfig" ...
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment