mirror of
https://github.com/TDSCDMAA/AutoMihoyoBBS.git
synced 2026-06-02 18:43:42 +08:00
云原神判断更新
This commit is contained in:
parent
dfd3ac996c
commit
a99eb07f6b
1
.gitignore
vendored
1
.gitignore
vendored
@ -141,3 +141,4 @@ config/*.yaml
|
|||||||
# push配置
|
# push配置
|
||||||
config/push.ini
|
config/push.ini
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
yaml/
|
||||||
|
|||||||
@ -35,11 +35,10 @@ class CloudGenshin:
|
|||||||
ret_msg = "云原神:\r\n"
|
ret_msg = "云原神:\r\n"
|
||||||
req = http.get(url=setting.cloud_genshin_sgin, headers=self.headers)
|
req = http.get(url=setting.cloud_genshin_sgin, headers=self.headers)
|
||||||
data = req.json()
|
data = req.json()
|
||||||
data2 = http.get(url=setting.cloud_genshin_inquire, headers=self.headers).json()
|
|
||||||
if data['retcode'] == 0:
|
if data['retcode'] == 0:
|
||||||
if len(data2['data']['list']) >= 1:
|
if int(data["data"]["free_time"]["send_freetime"]) > 0:
|
||||||
log.info('签到成功,已获得15分钟免费时长')
|
log.info(f'签到成功,已获得{data["data"]["free_time"]["send_freetime"]}分钟免费时长')
|
||||||
ret_msg += f'签到成功,已获得15分钟免费时长\n'
|
ret_msg += f'签到成功,已获得{data["data"]["free_time"]["send_freetime"]}分钟免费时长\n'
|
||||||
else:
|
else:
|
||||||
log.info('签到失败,未获得免费时长,可能是已经签到过了或者超出免费时长上线')
|
log.info('签到失败,未获得免费时长,可能是已经签到过了或者超出免费时长上线')
|
||||||
ret_msg += '签到失败,未获得免费时长,可能是已经签到过了或者超出免费时长上线\n'
|
ret_msg += '签到失败,未获得免费时长,可能是已经签到过了或者超出免费时长上线\n'
|
||||||
|
|||||||
@ -117,4 +117,3 @@ genshin_Signurl = web_Api + "/event/bbs_sign_reward/sign"
|
|||||||
# 云原神相关api
|
# 云原神相关api
|
||||||
cloud_genshin_Api = "https://api-cloudgame.mihoyo.com"
|
cloud_genshin_Api = "https://api-cloudgame.mihoyo.com"
|
||||||
cloud_genshin_sgin = cloud_genshin_Api + "/hk4e_cg_cn/wallet/wallet/get"
|
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"
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user