Skip to content

Commit

Permalink
Apply obfuscation to titles only
Browse files Browse the repository at this point in the history
  • Loading branch information
normalhuman committed Jul 22, 2016
1 parent 5159aee commit e3a4aae
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions findspam.py
Expand Up @@ -500,9 +500,12 @@ class FindSpam:
# Black magic at the beginning of question, Islam is exempt
{'regex': ur"^(?is).{0,200}black magic", 'all': True,
'sites': ["islam.stackexchange.com"], 'reason': "black magic in {}", 'title': True, 'body': True, 'username': False, 'stripcodeblocks': False, 'body_summary': True, 'answers': False, 'max_rep': 11, 'max_score': 0},
# Bad keywords in titles only, all sites
{'regex': ur"(?i)^(?:(?=.*?\b(?:online|hd)\b)(?=.*?(?:free|full|unlimited)).*?movies?\b)|(?=.*?\b(?:acai|kisn)\b)(?=.*?care).*products?\b|(?=.*?packer).*mover|(online|certification).*?training|\bvs\b.*\b(live|vivo)\b|(?<!can |uld )\bwe offer\b|payday loan|смотреть.*онлайн|watch\b.{0,50}(online|episode|free)|episode.{0,50}\bsub\b|\b[a-z]\.+[a-z]\.+[a-z]\.+[a-z]\b", 'all': True,
# Bad keywords in titles and usernames, all sites
{'regex': ur"(?i)^(?:(?=.*?\b(?:online|hd)\b)(?=.*?(?:free|full|unlimited)).*?movies?\b)|(?=.*?\b(?:acai|kisn)\b)(?=.*?care).*products?\b|(?=.*?packer).*mover|(online|certification).*?training|\bvs\b.*\b(live|vivo)\b|(?<!can |uld )\bwe offer\b|payday loan|смотреть.*онлайн|watch\b.{0,50}(online|episode|free)|episode.{0,50}\bsub\b", 'all': True,
'sites': [], 'reason': "bad keyword in {}", 'title': True, 'body': False, 'username': True, 'stripcodeblocks': False, 'body_summary': False, 'max_rep': 1, 'max_score': 0},
# Bad keywords in titles only, all sites
{'regex': ur"(?i)\b[a-z]\.+[a-z]\.+[a-z]\.+[a-z]\.+[a-z]\b", 'all': True,
'sites': [], 'reason': "bad keyword in {}", 'title': True, 'body': False, 'username': False, 'stripcodeblocks': False, 'body_summary': False, 'max_rep': 1, 'max_score': 0},
# Eltima: separated into its own method so we can constrain length
{'method': has_eltima, 'all': True, 'sites': [], 'reason': "bad keyword in {}", 'title': False, 'body': True, 'username': False, 'stripcodeblocks': False, 'body_summary': False, 'max_rep': 50, 'max_score': 0},
# Fake-customer-service in title
Expand Down

0 comments on commit e3a4aae

Please sign in to comment.