From 79b82c2d9d5d01cc7c725cef7815893e4d1082fd Mon Sep 17 00:00:00 2001 From: Akamaru Date: Fri, 22 Jul 2016 21:53:41 +0200 Subject: [PATCH] Update rss.lua & facebook.lua rss.lua: Ignoriere "[swr]" und "(RSS generated with FetchRss)" facebook.lua: Ignoriere Live-Videos (Von Brawl345/Brawlbot-v2) --- miku/plugins/facebook.lua | 2 +- miku/plugins/rss.lua | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/miku/plugins/facebook.lua b/miku/plugins/facebook.lua index 2d29a05..983c87d 100644 --- a/miku/plugins/facebook.lua +++ b/miku/plugins/facebook.lua @@ -91,7 +91,7 @@ function facebook:send_facebook_video(video_id) local data = json.decode(res) local from = '*'..data.from.name..'*' - local description = data.description + local description = data.description or '' local source = data.source return from..' hat ein Video gepostet:\n'..description, source, data.title end diff --git a/miku/plugins/rss.lua b/miku/plugins/rss.lua index 462ab04..249001d 100644 --- a/miku/plugins/rss.lua +++ b/miku/plugins/rss.lua @@ -84,11 +84,13 @@ function cleanRSS(str) str = string.gsub(str, '...%[more%]', '') str = string.gsub(str, '%[more%]', '') str = string.gsub(str, '%[phoenix%]', '') + str = string.gsub(str, '%[swr%]', '') str = string.gsub(str, 'Click for full.', '') str = string.gsub(str, 'Read more »', '') str = string.gsub(str, 'Read more', '') str = string.gsub(str, '%(more…%)', '') str = string.gsub(str, 'View On WordPress', '') + str = string.gsub(str, '%(RSS generated with FetchRss%)', '') str = string.gsub(str, 'Meldung bei www%.tagesschau%.de lesen', '') return str end