Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/findspam.py b/findspam.py
- index a19c988..7a24b7b 100644
- --- a/findspam.py
- +++ b/findspam.py
- @@ -1,4 +1,4 @@
- -<U+FEFF># -*- coding: utf-8 -*-
- +# -*- coding: utf-8 -*-
- import regex
- import phonenumbers
- @@ -26,7 +26,7 @@ class FindSpam:
- "JobsTribune", "join the illuminati", "Brorsoft", "Remo Recover",
- "kinnaristeel", "clash of (clan|stone)s? (cheats?|tricks?|gems?)",
- r"(?x:B [\s_]* A [\s_]* M \W{0,5} W [\s_]* A [\s_]* R [\s_]* \.? [\s_]* C [\s_]* O [\s_]* M)",
- - "slumber pm", "1-844-400-7325"]
- + "slumber pm", "1-844-400-7325", "male enhancement"]
- bad_keywords_nwb = [u"ಌ", "babyliss", "garcinia", "acai ?berry", # "nwb" == "no word boundary"
- "aging ?cream", u"오피", "b ?a ?m ?((w ?o ?w)|(w ?a ?r))"]
- blacklisted_websites = ["online ?kelas", "careyourhealths", "wowtoes",
- diff --git a/test/test_spamhandling.py b/test/test_spamhandling.py
- index 342d204..05ceecc 100644
- --- a/test/test_spamhandling.py
- +++ b/test/test_spamhandling.py
- @@ -27,7 +27,8 @@ with open("test/data_test_spamhandling.txt", "r") as f:
- ('Is it unfair to regrade prior work after detecting cheating?', '', 'Village', '', False),
- ('Inner workings of muscles', '', '', 'fitness.stackexchange.com', False),
- ('Cannot access http://stackoverflow.com/ with proxy enabled', '', '', 'superuser.com', False),
- - ('kkkkkkkkkkkkkkkkkkkkkkkkkkkk', '<p>bbbbbbbbbbbbbbbbbbbbbb</p>', '', 'stackoverflow.com', True)
- + ('kkkkkkkkkkkkkkkkkkkkkkkkkkkk', '<p>bbbbbbbbbbbbbbbbbbbbbb</p>', '', 'stackoverflow.com', True),
- + ('Enhance SD Male Enhancement Supplements', '', '', '', True)
- ])
- def test_check_if_spam(title, body, username, site, match):
- # We can't check blacklists/whitelists in tests, so these are set to their default values
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement