From c5af9e8d1bea68de591f33ce74f49d9a721f72f9 Mon Sep 17 00:00:00 2001 From: nico <13307130285@fudan.edu.cn> Date: Sat, 24 Mar 2018 19:46:33 +0800 Subject: [PATCH] =?UTF-8?q?bug=20=E4=BF=AE=E5=A4=8D=E4=BB=A5=E5=8F=8A?= =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit time那里pythonista死活打不出来。。。规避掉了 --- Silver.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Silver.py b/Silver.py index a557b0d..c1c8193 100644 --- a/Silver.py +++ b/Silver.py @@ -29,7 +29,7 @@ def time_start(self): temp = response.json() # print (temp['code']) #宝箱领完返回的code为-10017 if temp['code'] == -10017: - print(time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(time.time())), "今日宝箱领取完毕") + print("# 今日宝箱领取完毕") else: time_start = temp['data']['time_start'] return str(time_start) @@ -56,7 +56,6 @@ def GetAward(self): try: time = self.CurrentTime() timeend = self.time_end() - print("hello") timestart = self.time_start() temp_params = 'access_key=' + self.access_key + '&actionKey=' + self.actionKey + '&appkey=' + self.appkey + '&build=' + self.build + '&device=' + self.device + '&mobi_app=' + self.mobi_app + '&platform=' + self.platform + '&time_end=' + timeend + '&time_start=' + timestart + '&ts=' + time params = temp_params + self.app_secret @@ -72,13 +71,14 @@ def GetAward(self): async def run(self): while 1: + print(time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(time.time())), "检查宝箱状态") temp = self.GetAward() if temp == None or temp == -10017: print("# 半小时后检测是否第二天了") await asyncio.sleep(1800) elif temp == 0: - print(time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(time.time())), "打开了宝箱") + print("# 打开了宝箱") self.GetAward() else: - print(time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(time.time())), "继续等待宝箱冷却...") + print("# 继续等待宝箱冷却...") await asyncio.sleep(181)