def auto_detect_spam(self, user): if user.url: m = re.search(SPAM_TLDS_PATTERN, user.url) if m: return (True, 'url contains "%s"' % m.string[m.start():m.end()]) if user.bio: m = re.search(SPAM_TERMS_PATTERN, user.bio) if m: return (True, 'bio contains "%s"' % m.string[m.start():m.end()]) if user.url: m = re.search(SPAM_TERMS_PATTERN, user.url) if m: return (True, 'url contains "%s"' % m.string[m.start():m.end()]) # doing this last to avoid unnecessary wait if user.bio: if check_post_for_spam_via_defensio(user.bio): return (True, '') return (False, '')
def auto_detect_spam(self, user): if user.url: m = re.search(SPAM_TLDS_PATTERN, user.url) if m: return (True, 'url contains "%s"' % m.string[m.start():m.end()]) if user.bio: m = re.search(SPAM_TERMS_PATTERN, user.bio) if m: return (True, 'bio contains "%s"' % m.string[m.start():m.end()]) if user.url: m = re.search(SPAM_TERMS_PATTERN, user.url) if m: return (True, 'url contains "%s"' % m.string[m.start():m.end()]) # doing this last to avoid unnecessary wait if user.bio: if check_post_for_spam_via_defensio(user.bio): return (True, '') return (False, '')
def auto_detect_spam(self, post): if check_post_for_spam_via_defensio(post.description): return (True, "") return (False, "")
def auto_detect_spam(self, post): if check_post_for_spam_via_defensio(post.description): return (True, '') return (False, '')
def auto_detect_spam(self, comment): if check_post_for_spam_via_defensio(comment.comment): return (True, '') return (False, '')
def auto_detect_spam(self, thread): if check_post_for_spam_via_defensio(thread.content_object.comment): return (True, '') return (False, '')
def auto_detect_spam(self, comment): if check_post_for_spam_via_defensio(comment.comment): return (True, '') return (False, '')
def auto_detect_spam(self, thread): if check_post_for_spam_via_defensio(thread.content_object.comment): return (True, '') return (False, '')