From a99eb07f6bcbd70bd99dfd548d6b5fb701246109 Mon Sep 17 00:00:00 2001 From: clover420 <748883120@qq.com> Date: Tue, 30 Aug 2022 08:55:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=91=E5=8E=9F=E7=A5=9E=E5=88=A4=E6=96=AD?= =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + cloud_genshin.py | 7 +++---- setting.py | 1 - 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 09b23d0..00d6609 100644 --- a/.gitignore +++ b/.gitignore @@ -141,3 +141,4 @@ config/*.yaml # push配置 config/push.ini .DS_Store +yaml/ diff --git a/cloud_genshin.py b/cloud_genshin.py index aacc477..c1a0db2 100644 --- a/cloud_genshin.py +++ b/cloud_genshin.py @@ -35,11 +35,10 @@ class CloudGenshin: ret_msg = "云原神:\r\n" req = http.get(url=setting.cloud_genshin_sgin, headers=self.headers) data = req.json() - data2 = http.get(url=setting.cloud_genshin_inquire, headers=self.headers).json() if data['retcode'] == 0: - if len(data2['data']['list']) >= 1: - log.info('签到成功,已获得15分钟免费时长') - ret_msg += f'签到成功,已获得15分钟免费时长\n' + if int(data["data"]["free_time"]["send_freetime"]) > 0: + log.info(f'签到成功,已获得{data["data"]["free_time"]["send_freetime"]}分钟免费时长') + ret_msg += f'签到成功,已获得{data["data"]["free_time"]["send_freetime"]}分钟免费时长\n' else: log.info('签到失败,未获得免费时长,可能是已经签到过了或者超出免费时长上线') ret_msg += '签到失败,未获得免费时长,可能是已经签到过了或者超出免费时长上线\n' diff --git a/setting.py b/setting.py index 18d8d04..c43ab88 100644 --- a/setting.py +++ b/setting.py @@ -117,4 +117,3 @@ genshin_Signurl = web_Api + "/event/bbs_sign_reward/sign" # 云原神相关api cloud_genshin_Api = "https://api-cloudgame.mihoyo.com" cloud_genshin_sgin = cloud_genshin_Api + "/hk4e_cg_cn/wallet/wallet/get" -cloud_genshin_inquire = cloud_genshin_Api + "/hk4e_cg_cn/gamer/api/listNotifications?status=NotificationStatusUnread&type=NotificationTypePopup&is_sort=true"