Skip to content

Commit

Permalink
Fix empty keywords --autopull
Browse files Browse the repository at this point in the history
oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
  • Loading branch information
iBug committed Sep 13, 2018
1 parent 2b49eb6 commit 61619ea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions findspam.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,13 +396,13 @@ def what_is_this_pharma_title(s, site): # title "what is this Xxxx?"
def keyword_email(s, site): # a keyword and an email in the same post
if regex.compile("<pre>|<code>").search(s) and site == "stackoverflow.com": # Avoid false positives on SO
return False, ""
keyword = regex.compile(r"(?i)\b(training|we (will )?(offer|develop|provide)|sell|invest(or|ing|ment)|credit|"
keyword = regex.compile(r"(?i)(\b(?:training|we (will )?(offer|develop|provide)|sell|invest(or|ing|ment)|credit|"
r"money|quality|legit|interest(ed)?|guarantee|rent|crack|opportunity|fundraising|campaign|"
r"career|employment|candidate|loan|lover|husband|wife|marriage|illuminati|brotherhood|"
r"(join|contact) (me|us|him)|reach (us|him)|spell(caster)?|doctor|cancer|krebs|"
r"(cheat|hack)(er|ing)?|spying|passport|seaman|scam|pics|vampire|bless(ed)?|atm|miracle|"
r"cure|testimony|kidney|hospital|wetting)s?\b| Dr\.? |\$ ?[0-9,.]{4}|@qq\.com|"
r"\b(герпес|муж|жена|доктор|болезн)").findall(s)
r"\b(?:герпес|муж|жена|доктор|болезн))").findall(s)
keyword = [t[0] for t in keyword]
email = regex.compile(r"(?<![=#/])\b[A-z0-9_.%+-]+\b(?:@|\(?at\)?)\b(?!(example|domain|site|foo|\dx)"
r"(?:\.|\(?dot\)?)[A-z]{2,4})\b(?:[A-z0-9_.%+-]|\(?dot\)?)+\b"
Expand Down

0 comments on commit 61619ea

Please sign in to comment.