mirror of
https://github.com/Sitoi/dailycheckin.git
synced 2024-11-17 13:48:03 +08:00
🐛 修复 有道云 获取返回值错误的 BUG
This commit is contained in:
parent
858e2d2b77
commit
bc3f8f7e59
@ -24,10 +24,10 @@ class YouDaoCheckIn:
|
||||
ad_response = requests.post(
|
||||
url="https://note.youdao.com/yws/mapi/user?method=adRandomPrompt", cookies=cookies
|
||||
)
|
||||
ad_space += ad_response.json()["space"] // 1048576
|
||||
ad_space += ad_response.json().get("space", 0) // 1048576
|
||||
if "reward" in res.text:
|
||||
sync_space = res.json()["rewardSpace"] // 1048576
|
||||
checkin_space = checkin_response.json()["space"] // 1048576
|
||||
sync_space = res.json().get("rewardSpace", 0) // 1048576
|
||||
checkin_space = checkin_response.json().get("space", 0) // 1048576
|
||||
space = sync_space + checkin_space + ad_space
|
||||
youdao_message = "+{0}M".format(space)
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user