RedditBot: strip some punctuation/symbols.
This commit is contained in:
parent
c36a4778d8
commit
fc2328a613
|
|
@ -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])
|
||||
|
|
|
|||
Loading…
Reference in New Issue