From fc2328a613b253793becf6313bb0aa46e39ac146 Mon Sep 17 00:00:00 2001 From: oddluck <39967334+oddluck@users.noreply.github.com> Date: Thu, 19 Dec 2019 14:42:01 +0000 Subject: [PATCH] RedditBot: strip some punctuation/symbols. --- RedditBot/plugin.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/RedditBot/plugin.py b/RedditBot/plugin.py index f0511b2..0818023 100644 --- a/RedditBot/plugin.py +++ b/RedditBot/plugin.py @@ -210,9 +210,8 @@ class RedditBot(callbacks.Plugin): # We will only take 3 properties, the timestamp, subreddit and comment body. self.latest_timestamp = item["created_utc"] # We clean the greater-than and less-than and zero-width html code. - body = item["body"].replace(">", ">").replace( - "<", "<").replace("&#x200B", " ") - body = fix_text(body) + body = fix_text(item["body"]) + body = re.sub("\(|\)|\[|\]|\{|\}|\*|\"", "", body) body = self.capsents(body) self.comments_list.append( [body])