[vlc-commits] dailymotion.lua: make website tag stripping robust against more languages

Pierre Ynard git at videolan.org
Wed Jul 22 09:02:21 CEST 2020


vlc/vlc-3.0 | branch: master | Pierre Ynard <linkfanel at yahoo.fr> | Wed Jul 22 08:48:37 2020 +0200| [939e443be9330cbac4b3ab427d3236c53d5d2151] | 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.

(cherry picked from commit b32d291f2334f3f157fbbc18c2fb50c9c462d5d0)
Signed-off-by: Pierre Ynard <linkfanel at yahoo.fr>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=939e443be9330cbac4b3ab427d3236c53d5d2151
---

 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