Exemple #1
0
 def ping(self):
     r = re.compile('<a.*?href=["\'](.*?)["\'].*?>', re.I | re.S)
     for anchor in r.finditer(self.body_html):
         link = anchor.group(1)
         if link.startswith(settings.BLANGO_URL):
             continue
         s = Spider(link)
         if not s.trackback(title=self.title,
                 url=self.get_absolute_url(),
                 excerpt=self.body_html,
                 page_name=settings.BLANGO_TITLE):
             s.pingback(self.get_absolute_url())