diff --git a/miku/plugins/rss.lua b/miku/plugins/rss.lua index 57772a6..00f96c5 100644 --- a/miku/plugins/rss.lua +++ b/miku/plugins/rss.lua @@ -87,7 +87,9 @@ function cleanRSS(str) str = string.gsub(str, 'Click for full.', '') str = string.gsub(str, 'Read more »', '') str = string.gsub(str, 'Read more', '') - str = string.gsub(str, 'Meldung bei www.tagesschau.de lesen', '') + str = string.gsub(str, '%(more…%)', '') + str = string.gsub(str, 'View on WordPress', '') + str = string.gsub(str, 'Meldung bei www%.tagesschau%.de lesen', '') return str end @@ -344,20 +346,20 @@ function rss:cron(self_plz) local link = v2.link or v2.id or 'Kein Link' if v2.content then if string.len(v2.content) > 250 then - content = string.sub(unescape_for_rss(cleanRSS(v2.content):gsub("%b<>", "")), 1, 250) .. '...' + content = string.sub(unescape_for_rss(v2.content:gsub("%b<>", "")), 1, 250) .. '...' else - content = unescape_for_rss(cleanRSS(v2.content):gsub("%b<>", "")) + content = unescape_for_rss(v2.content:gsub("%b<>", "")) end elseif v2.summary then if string.len(v2.summary) > 250 then - content = string.sub(unescape_for_rss(cleanRSS(v2.summary):gsub("%b<>", "")), 1, 250) .. '...' + content = string.sub(unescape_for_rss(v2.summary:gsub("%b<>", "")), 1, 250) .. '...' else - content = unescape_for_rss(cleanRSS(v2.summary):gsub("%b<>", "")) + content = unescape_for_rss(v2.summary:gsub("%b<>", "")) end else content = '' end - + content = cleanRSS(content) text = text..'\n*[*#RSS*] '..title..'*\n'..utilities.trim(utilities.md_escape(content))..' [Weiterlesen]('..link..')\n' end if text ~= '' then