def __first_fetch(self): try: warning(f"Domain: {self.__domain}") self.__clear_cookies() self.__autim, self.__sid, self.__login_payload, self.__login_url, self.__reg_url = Parser.get_login_and_reg_payload( self.__refresh_new_target(self.__to_main_page()) ) # / -> ucp.php self.__report_cookies() user = Cursor.get_random_user() if not user: self.__reg() else: self.usr = user.user self.pwd = user.pwd if random.choice([1, 0, 0, 0, 0]): # 佛系注册堆积账号池 self.__reg() return True except KeyboardInterrupt: exit() except Exception as e: raise e
def update_random_user(self): user = Cursor.get_random_user() if user or True: self.usr = user.user self.pwd = user.pwd return True