Skip to content

Commit

Permalink
add nwb keywords to sites pattern
Browse files Browse the repository at this point in the history
So that the sites will be reported as such when the domain name contains those keywords. This tells us there's no need to add the URL to patterns, and also indicates a more reliable spam report.
  • Loading branch information
normalhuman committed Feb 1, 2016
1 parent fe66bcc commit aac5203
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion findspam.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ class FindSpam:
{'regex': u"(?i)({})".format("|".join(blacklisted_websites)), 'all': True,
'sites': [], 'reason': "blacklisted website in {}", 'title': True, 'body': True, 'username': False, 'stripcodeblocks': False, 'body_summary': True, 'max_rep': 50, 'max_score': 5},
# Suspicious sites
{'regex': u"(?i)({})(?![^>]*<)".format("|".join(pattern_websites)), 'all': True,
{'regex': ur"(?i)({}|({})[\w-]*?\.(co|net|org|in\W|info))(?![^>]*<)".format("|".join(pattern_websites), "|".join(bad_keywords_nwb)), 'all': True,
'sites': [], 'reason': "pattern-matching website in {}", 'title': True, 'body': True, 'username': False, 'stripcodeblocks': True, 'body_summary': True, 'max_rep': 11, 'max_score': 2},
# Suspicious health-related websites, health sites are exempt
{'regex': ur"(?i)(workout|fitness\w{2,}|diet|perfecthealth|muscle|prostate)[\w-]*?\.(com|co\.|net|org|info)", 'all': True,
Expand Down

0 comments on commit aac5203

Please sign in to comment.