Exemple #1
0
 def gotMainPage( self, data, stale ):
     rss = getRSSLinkFromHTMLSource(data)
     if rss:
         feed_url = urlparse.urljoin( self.url, rss )
         self.getFeed( feed_url )
     else:
         self.dead = True
         self.changed()
Exemple #2
0
 def detectRss(self):
   self.rss_feed = autorss.getRSSLinkFromHTMLSource(self.data)
   firstfeed = feedparser.parse(self.rss_feed, 43200)
   if hasattr(firstfeed, 'author_detail') is True:
     if firstfeed.author_detail.name is not None:
       self.author = unicode(firstfeed.author_detail.name)
   else:
     authorarray = []
     for i in firstfeed.entries:
       if hasattr(i, 'author'):
         authorarray += [i.author]
     if len(authorarray) is not 0:
       self.author = unicode(getMostPopularFromList(authorarray))