awesm.py 483 B

12345678910111213
  1. from terroroftinytown.services.base import BaseService
  2. from terroroftinytown.services.status import URLStatus
  3. class AwesmService(BaseService):
  4. def process_redirect(self, response):
  5. status, url, encoding = BaseService.process_redirect(self, response)
  6. if url.startswith('http://totally.awe.sm/') and \
  7. url.endswith(self.current_shortcode):
  8. return URLStatus.not_found, None, None
  9. else:
  10. return status, url, encoding