Skip to content

Commit

Permalink
Merge pull request #1614 from iBug/patch-4
Browse files Browse the repository at this point in the history
Catch shortened URL starting with www
  • Loading branch information
quartata committed Feb 17, 2018
2 parents 39d097a + e00340f commit 0f9c3b1
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions findspam.py
Original file line number Diff line number Diff line change
Expand Up @@ -991,16 +991,16 @@ class FindSpam:
'sites': [], 'reason': 'link at end of {}', 'title': False, 'body': True, 'username': False,
'stripcodeblocks': False, 'body_summary': False, 'questions': False, 'max_rep': 1, 'max_score': 0},
# Shortened URL near the end of question
{'regex': r"(?is)://(goo\.gl|bit\.ly|bit\.do|tinyurl\.com|fb\.me|cl\.ly|t\.co|is\.gd|j\.mp|tr\.im|ow\.ly|"
{'regex': r"(?is)://(?:w+\.)?(goo\.gl|bit\.ly|bit\.do|tinyurl\.com|fb\.me|cl\.ly|t\.co|is\.gd|j\.mp|tr\.im|"
r"wp\.me|alturl\.com|tiny\.cc|9nl\.me|post\.ly|dyo\.gs|bfy\.tw|amzn\.to|adf\.ly|adfoc\.us|"
r"surl\.cn\.com|clkmein\.com|bluenik\.com|rurl\.us|adyou\.co|buff\.ly)/.{0,200}$", 'all': True,
'sites': ["superuser.com", "askubuntu.com"], 'reason': "shortened URL in {}", 'title': False, 'body': True,
'username': False, 'stripcodeblocks': True, 'body_summary': False, 'answers': False, 'max_rep': 1,
'max_score': 0},
r"surl\.cn\.com|clkmein\.com|bluenik\.com|rurl\.us|adyou\.co|buff\.ly|ow\.ly)/.{0,200}$",
'all': True, 'sites': ["superuser.com", "askubuntu.com"], 'reason': "shortened URL in {}", 'title': False,
'body': True, 'username': False, 'stripcodeblocks': True, 'body_summary': False, 'answers': False,
'max_rep': 1, 'max_score': 0},
# Shortened URL in an answer
{'regex': r"(?is)://(goo\.gl|bit\.ly|bit\.do|tinyurl\.com|fb\.me|cl\.ly|t\.co|is\.gd|j\.mp|tr\.im|ow\.ly|"
{'regex': r"(?is)://(?:w+\.)?(goo\.gl|bit\.ly|bit\.do|tinyurl\.com|fb\.me|cl\.ly|t\.co|is\.gd|j\.mp|tr\.im|"
r"wp\.me|alturl\.com|tiny\.cc|9nl\.me|post\.ly|dyo\.gs|bfy\.tw|amzn\.to|adf\.ly|adfoc\.us|"
r"surl\.cn\.com|clkmein\.com|bluenik\.com|rurl\.us|adyou\.co|buff\.ly)/",
r"surl\.cn\.com|clkmein\.com|bluenik\.com|rurl\.us|adyou\.co|buff\.ly|ow\.ly)/",
'all': True, 'sites': ["codegolf.stackexchange.com"], 'reason': "shortened URL in {}", 'title': False,
'body': True, 'username': False, 'stripcodeblocks': True, 'body_summary': False, 'questions': False,
'max_rep': 1, 'max_score': 0},
Expand Down

0 comments on commit 0f9c3b1

Please sign in to comment.