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()
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()
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()
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()