From e2d7fd0788474ef4965fcd74f8da1beabfe154da Mon Sep 17 00:00:00 2001 From: chen_10 <1803012703@qq.com> Date: Mon, 21 Mar 2022 15:14:26 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9F=B3=E4=B9=90=E4=BA=BA=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E5=A4=B1=E8=B4=A5=E6=97=B6=E9=87=8D=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- user.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/user.py b/user.py index cc6d0362d..36e1efe1a 100644 --- a/user.py +++ b/user.py @@ -578,12 +578,20 @@ def sign(self): def get_missions(self): cycle_result = self.music.mission_cycle_get() + if cycle_result['code'] != 200: + time.sleep(0.2) + cycle_result = self.music.mission_cycle_get() time.sleep(0.5) stage_result = self.music.mission_stage_get() + if stage_result['code'] != 200: + time.sleep(0.2) + stage_result = self.music.mission_stage_get() missions = [] if cycle_result['code'] == 200: missions.extend(cycle_result.get('data', {}).get('list', [])) + else: + print('每日任务获取失败:', self.errMsg(cycle_result)) if stage_result['code'] == 200: for mission in stage_result['data']['list']: for target in mission['userStageTargetList']: @@ -595,7 +603,8 @@ def get_missions(self): if 'userMissionId' in target: m['userMissionId'] = target['userMissionId'] missions.append(m) - + else: + print('每周任务获取失败:', self.errMsg(stage_result)) return missions def musician_task(self):