def logout_account(): # 注销 ''' 注销登录 ''' print("logout...") logout() print('Done!')
def loop(): # 循环登录 global password if not load_conf(): setdefaulttimeout(2) logout() setdefaulttimeout(3) while not getAccount(): password = None print ("%s try login fialed!\n%s" % (account, error())) else: print ("Login SUCCESS!") setdefaulttimeout(TIMEOUT) while True: print (time.ctime()) if auto(): time.sleep(cir_time) # 每隔cir_time秒执行一次 else: time.sleep(cir_time / 5) # 每隔cir_time秒执行一次
def loop(): # 循环登录 global password if not load_conf(): setdefaulttimeout(2) logout() setdefaulttimeout(3) while not getAccount(): password = None print "%s try login fialed!\n%s" % (account, error()) else: print "Login SUCCESS!" setdefaulttimeout(TIMEOUT) while True: print time.ctime() if auto(): time.sleep(cir_time) # 每隔cir_time秒执行一次 else: time.sleep(cir_time / 5) # 每隔cir_time秒执行一次
def logoutAccount(): print "logout..." logout() print 'Done!'