Skip to content
Permalink
Browse files

Catch Judaism's recent troll

  • Loading branch information...
ArtOfCode- committed Jun 11, 2017
1 parent 19f93ad commit d12a86099465232c380d5c1cac46b405dd654dc7
Showing with 12 additions and 0 deletions.
  1. +12 −0 findspam.py
@@ -476,6 +476,15 @@ def mostly_dots(s, site, *args):
return False, ""


def mevaqesh_troll(s, site):
s = s.lower().replace(' ', '')
bad = 'mevaqeshthereforehasnoshareintheworldtocome'
if s == bad:
return True, "Post matches pattern from a known troll"
else:
return False, ""


# noinspection PyClassHasNoInit
class FindSpam:
with open("bad_keywords.txt", "r", encoding="utf-8") as f:
@@ -749,6 +758,9 @@ class FindSpam:
'sites': ["skeptics.stackexchange.com", "history.stackexchange.com"],
'reason': "bad keyword in {}", 'title': True, 'body': True, 'username': False, 'stripcodeblocks': False,
'body_summary': False, 'max_rep': 1, 'max_score': 0},
{'method': mevaqesh_troll, 'all': False, 'sites': 'judaism.stackexchange.com',
'reason': 'Potential "Mevaqesh" troll', 'title': False, 'body': True, 'username': False,
'stripcodeblocks': False, 'body_summary': False, 'max_rep': 11, 'max_score': 1},
#
# Category: Suspicious links
# Blacklisted sites

0 comments on commit d12a860

Please sign in to comment.
You can’t perform that action at this time.