Beispiel #1
0
 def check_content(self):
     """
     Check URL and page content for profanities or shock sites.
     """
     url_content = ' '.join(
         (self.cleaned_data['url'], self.cleaned_data['content']))
     self.cleaned_data['profanities'] = \
         count_profanities(settings.PROFANITIES_LIST, url_content)
     self.cleaned_data['shocksite_keywords'] = \
         count_profanities(settings.SHOCKSITE_KEYWORDS_LIST, url_content)