示例#1
0
文件: scrapers.py 项目: pabit/Pompem
 def run(self, ):
     for page in range(self.page_max):
         try:
             url_search = self.url.format(page + 1, self.key_word)
             req_worker = RequestWorker(url_search)
             req_worker.start()
             self.list_req_workers.append(req_worker)
         except Exception as e:
             import traceback
             traceback.print_exc()
     self._get_results()
示例#2
0
文件: scrapers.py 项目: pabit/Pompem
 def run(self, ):
     try:
         url_search = self.url.format(self.key_word)
         req_worker = RequestWorker(url=url_search, data={'agree': 'Yes%2C+I+agree'},
                                    session_url=self.session_url)
         req_worker.start()
         self.list_req_workers.append(req_worker)
     except Exception as e:
         import traceback
         traceback.print_exc()
     self._get_results()
示例#3
0
 def run(self, ):
     for page in range(self.page_max):
         try:
             url_search = self.url.format(page + 1, self.key_word)
             req_worker = RequestWorker(url_search)
             req_worker.start()
             self.list_req_workers.append(req_worker)
         except Exception as e:
             import traceback
             traceback.print_exc()
     self._get_results()
示例#4
0
 def run(self, ):
     try:
         url_search = self.url.format(self.key_word)
         req_worker = RequestWorker(url=url_search,
                                    data={'agree': 'Yes%2C+I+agree'},
                                    session_url=self.session_url)
         req_worker.start()
         self.list_req_workers.append(req_worker)
     except Exception as e:
         import traceback
         traceback.print_exc()
     self._get_results()
示例#5
0
文件: scrapers.py 项目: rfunix/Pompem
    def run(self,):
        now_date = "{dt.year}.{dt.month}.{dt.day}".format(dt=datetime.datetime.now())
        for page in range(self.page_max):
            try:
                url_search = self.url.format(now_date, page + 1, self.page_max, self.key_word)
                req_worker = RequestWorker(url_search)
                req_worker.start()
                self.list_req_workers.append(req_worker)
            except Exception as e:
                import traceback

                traceback.print_exc()
        self._get_results()
示例#6
0
 def run(self, ):
     now_date = '{dt.year}.{dt.month}.{dt.day}'.format(
         dt=datetime.datetime.now())
     for page in range(self.page_max):
         try:
             url_search = self.url.format(now_date, page + 1, self.page_max,
                                          self.key_word)
             req_worker = RequestWorker(url_search)
             req_worker.start()
             self.list_req_workers.append(req_worker)
         except Exception as e:
             import traceback
             traceback.print_exc()
     self._get_results()