def start_a(self, attrs): if not self.parseContent: return self.parseContent = False nodes = attrs2dic(attrs) self.url = "%s" % nodes["href"] self.parseTitle = True
def start_a(self, attrs): if not self.parseContent: return nodes = attrs2dic(attrs) self.url = "%s%s" % (HOME_URL, nodes["href"]) self.parseTitle = True
def start_a(self, attrs): if self.hasValue: return nodes = attrs2dic(attrs) if "class" in nodes and nodes["class"] == "title": hasValue = True self.title = nodes["title"] self.url = "%s%s" % (HOME_URL, nodes["href"])
def start_div(self, attrs): nodes = attrs2dic(attrs) if not self.hasValue and "class" in nodes and nodes["class"] == "newslist": self.parseContent = True self.hasValue = True
def start_div(self, attrs): nodes = attrs2dic(attrs) if not self.hasValue and "class" in nodes and nodes["class"] == "item": self.parseContent = True self.hasValue = True
def start_div(self, attrs): nodes = attrs2dic(attrs) if not self.hasValue and "class" in nodes and nodes["class"] == "post_item_body": self.hasValue = True self.parseContent = True