def fetchLastStory(self, hashStorage): feed = HTTPHandler("tmp/SmartfictionCookie.tmp") feedXML = feed.getContent(self.__feedsURL) feedUpdated = self.feedsUpdateStatus(feedXML) if feedUpdated: soup = BeautifulSoup(feedXML) storyAttrs = soup.rss.channel.item.title.renderContents() storyAttrsList = storyAttrs.split(". ") title = storyAttrsList[0] author = storyAttrsList[1] storyHash = hashlib.new("ripemd160") storyHash.update(storyAttrs) hash = storyHash.hexdigest() url = soup.rss.channel.item.comments.renderContents() return {'author': author, 'title': title, 'url': url, 'hash': hash} else: return False