Esempio n. 1
0
    def parse_content(self, content):
        parser = CollectionParser(content)
        self.question_list += parser.get_question_info_list()
        self.answer_list += parser.get_answer_list()

        collection_info = parser.get_extra_info()
        self.add_collection_index(collection_info['collection_id'], parser.get_answer_list())
        return
Esempio n. 2
0
 def catch_info(self, target_url):
     if target_url in self.info_url_complete_set:
         return
     content = Http.get_content(target_url)
     if not content:
         return
     self.info_url_complete_set.add(target_url)
     parser = CollectionParser(content)
     self.info_list.append(parser.get_extra_info())
     return
Esempio n. 3
0
 def catch_info(self, target_url):
     if target_url in self.info_url_complete_set:
         return
     content = Http.get_content(target_url)
     if not content:
         return
     self.info_url_complete_set.add(target_url)
     parser = CollectionParser(content)
     self.info_list.append(parser.get_extra_info())
     return
Esempio n. 4
0
    def parse_content(self, content):
        parser = CollectionParser(content)
        self.question_list += parser.get_question_info_list()
        self.answer_list += parser.get_answer_list()

        collection_info = parser.get_extra_info()
        self.add_collection_index(collection_info['collection_id'],
                                  parser.get_answer_list())

        return