def Run(self): while True: try: make_new_tor_id() self.__check_if_need_relogin(None, True, False) for qeaid, name in self.types.items(): max_page = self.__get_type_datas(qeaid, name) for page in range(2, max_page): if not self.__get_type_datas(qeaid, name, page): break except KeyboardInterrupt: exit()
def run(self): while True: try: self.session = self.new_session() make_new_tor_id() self.check_if_need_relogin(None, True, False) for qeaid, name in self.types.items(): max_page = self.get_type_datas(qeaid, name) for page in range(2, max_page): if not self.get_type_datas(qeaid, name, page): break except KeyboardInterrupt: exit() finally: time.sleep(1)