Skip to content

Commit

Permalink
#19 Fix parsing issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Felix83000 authored Dec 7, 2020
1 parent 0cf1fb3 commit be79b74
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Watcher/Watcher/threats_watcher/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,11 @@ def remove_banned_words():
word = re.sub(r"[^a-zA-Z0-9]+" + r'$', '', word)
# Remove version numbers
word = re.sub(r"^(\d+\.)?(\d+\.)?(\*|\d+)?(\.\d+)?(\.\d+)$" + r'$', '', word)
for c in word:
if c == '/':
word = ""
# Remove ' (sometimes regular expression don't catch this character)
word = word.replace("'", "")
# Remove '/' (sometimes regular expression don't catch this character)
word = word.replace("/", "")

if word:
posts_without_banned[word] = count

Expand Down

0 comments on commit be79b74

Please sign in to comment.