[vlc-commits] dailymotion.lua: make website tag stripping robust against more languages
Pierre Ynard
git at videolan.org
Wed Jul 22 08:55:38 CEST 2020
vlc | branch: master | Pierre Ynard <linkfanel at yahoo.fr> | Wed Jul 22 08:48:37 2020 +0200| [b32d291f2334f3f157fbbc18c2fb50c9c462d5d0] | committer: Pierre Ynard
dailymotion.lua: make website tag stripping robust against more languages
This supports languages using more diacritics, and using other scripts
than Latin. It still fails for at least Chinese.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b32d291f2334f3f157fbbc18c2fb50c9c462d5d0
---
share/lua/playlist/dailymotion.lua | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/share/lua/playlist/dailymotion.lua b/share/lua/playlist/dailymotion.lua
index 561f8b26d4..7916342cef 100644
--- a/share/lua/playlist/dailymotion.lua
+++ b/share/lua/playlist/dailymotion.lua
@@ -34,7 +34,7 @@ function parse()
if string.match( line, "<meta property=\"og:title\"" ) then
_,_,name = string.find( line, "content=\"(.-)\"" )
name = vlc.strings.resolve_xml_special_chars( name )
- name = string.gsub( name, " %- [Vv]id..?o [Dd]ailymotion$", "" )
+ name = string.gsub( name, " %- [^ ]+ [Dd]ailymotion$", "" )
end
if string.match( line, "<meta name=\"description\"" ) then
_,_,description = string.find( line, "content=\"(.-)\"" )
More information about the vlc-commits
mailing list