Exemplo n.º 1
0
 def extract_results(self, query_resp):
     ret = []
     for k, pid_dict in query_resp['pages'].iteritems():
         page = PageInfo.from_query(pid_dict,
                                    source=self.source)
         ret.append(page)
     return ret
Exemplo n.º 2
0
 def extract_results(self, query_resp):
     ret = []
     for k, pid_dict in query_resp['pages'].iteritems():
         page_info = PageInfo.from_query(pid_dict,
                                         source=self.source)
         ret.append(page_info)
     return ret
Exemplo n.º 3
0
 def extract_results(self, query_resp):
     ret = []
     for pid, pid_dict in query_resp.get('pages', {}).iteritems():
         page_info = PageInfo.from_query(pid_dict,
                                         source=self.source)
         ret.append(page_info)
     return ret
Exemplo n.º 4
0
 def extract_results(self, query_resp):
     ret = []
     for pid, pid_dict in query_resp['pages'].iteritems():
         if pid.startswith('-'):
             continue
         page_ident = PageInfo.from_query(pid_dict, source=self.source)
         ret.append(page_ident)
     return ret
Exemplo n.º 5
0
 def extract_results(self, query_resp):
     ret = []
     for pid, pid_dict in query_resp["pages"].iteritems():
         if pid.startswith("-"):
             pid_dict["pageid"] = None  # TODO: breaks consistency :/
         page_ident = PageInfo.from_query(pid_dict, source=self.source)
         ret.append(page_ident)
     return ret
Exemplo n.º 6
0
 def extract_results(self, query_resp):
     ret = []
     for pid, pid_dict in query_resp['pages'].iteritems():
         if pid.startswith('-'):
             pid_dict['pageid'] = None  # TODO: breaks consistency :/
         page_ident = PageInfo.from_query(pid_dict,
                                          source=self.source)
         ret.append(page_ident)
     return ret
Exemplo n.º 7
0
Arquivo: misc.py Projeto: 1ss/wapiti
 def extract_results(self, query_resp):
     ret = []
     for pid, pid_dict in query_resp['pages'].iteritems():
         if pid.startswith('-'):
             continue
         page_ident = PageInfo.from_query(pid_dict,
                                          source=self.source)
         ret.append(page_ident)
     return ret
Exemplo n.º 8
0
 def extract_results(self, query_resp):
     ret = []
     for k, pid_dict in query_resp['pages'].iteritems():
         try:
             page_ident = PageInfo.from_query(pid_dict,
                                              source=self.source)
         except ValueError:
             continue
         ret.append(page_ident)
     return ret
Exemplo n.º 9
0
 def extract_results(self, query_resp):
     ret = []
     for pid, pid_dict in query_resp['pages'].iteritems():
         if pid.startswith('-'):
             pid_dict['pageid'] = None  # TODO: breaks consistency :/
         try:
             page_ident = PageInfo.from_query(pid_dict,
                                              source=self.source)
         except ValueError:
             continue
         ret.append(page_ident)
     return ret
Exemplo n.º 10
0
 def extract_results(self, query_resp):
     ret = []
     for k, pid_dict in query_resp.get('pages', {}).items():
         page_ident = PageInfo.from_query(pid_dict, source=self.source)
         ret.append(page_ident)
     return ret