Commit 6d5cb64b authored by Fabio Ritrovato's avatar Fabio Ritrovato Committed by Jean-Baptiste Kempf

Dailymotion: fix for other domains and description parsing

Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent a899dcfc
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
-- Probe function. -- Probe function.
function probe() function probe()
return vlc.access == "http" return vlc.access == "http"
and string.match( vlc.path, "dailymotion.com" ) and string.match( vlc.path, "dailymotion." )
and string.match( vlc.peek( 2048 ), "<!DOCTYPE.*video_type" ) and string.match( vlc.peek( 2048 ), "<!DOCTYPE.*video_type" )
end end
...@@ -85,7 +85,7 @@ function parse() ...@@ -85,7 +85,7 @@ function parse()
end end
if string.match( line, "<meta name=\"description\"" ) if string.match( line, "<meta name=\"description\"" )
then then
description = vlc.strings.resolve_xml_special_chars( find( line, "name=\"description\" content=\"(.-)\"" ) ) description = vlc.strings.resolve_xml_special_chars( find( line, "name=\"description\" lang=\".-\" content=\"(.-)\"" ) )
end end
if path and name and description and arturl then break end if path and name and description and arturl then break end
end end
......
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