Exemple #1
0
 def catch_info(self, target_url):
     content = HttpBaseClass.get_http_content(target_url + '/top-answers', timeout=SettingClass.WAITFOR_HTML)
     if not content:
         return
     self.info_url_set.discard(target_url)
     parser = TopicParser(content)
     self.info_list.append(parser.get_extra_info())
     return
Exemple #2
0
 def catch_info(self, target_url):
     content = HttpBaseClass.get_http_content(
         target_url + '/top-answers', timeout=SettingClass.WAITFOR_HTML)
     if not content:
         return
     self.info_url_set.discard(target_url)
     parser = TopicParser(content)
     self.info_list.append(parser.get_extra_info())
     return
Exemple #3
0
    def parse_content(self,content):
        parser = TopicParser(content)
        self.question_list += parser.get_question_info_list()
        self.answer_list += parser.get_answer_list()

        topic_info = parser.get_extra_info()
        self.add_topic_index(topic_info['topic_id'], parser.get_answer_list())

        return
Exemple #4
0
    def parse_content(self, content):
        parser = TopicParser(content)
        self.question_list += parser.get_question_info_list()
        self.answer_list += parser.get_answer_list()

        topic_info = parser.get_extra_info()
        self.add_topic_index(topic_info['topic_id'], parser.get_answer_list())

        return