RedditBot: strip some punctuation/symbols.

This commit is contained in:
oddluck 2019-12-19 14:42:01 +00:00
parent c36a4778d8
commit fc2328a613
1 changed files with 2 additions and 3 deletions

View File

@ -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(
"&lt;", "<").replace("&amp;#x200B", " ")
body = fix_text(body)
body = fix_text(item["body"])
body = re.sub("\(|\)|\[|\]|\{|\}|\*|\"", "", body)
body = self.capsents(body)
self.comments_list.append(
[body])