Skip to content

Commit

Permalink
Merge pull request Devilstore#3 from caoyaochong/master
Browse files Browse the repository at this point in the history
修改重复签到匹配值
  • Loading branch information
Devilstore committed Sep 11, 2024
2 parents 62da474 + 034a1e6 commit f018437
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/gladosCheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
- 'README.md'
- 'imgs/'
schedule:
- cron: '0 0,12 * * *'
- cron: '0 0,12 * * *'
watch:
types: started

Expand Down
11 changes: 7 additions & 4 deletions checkin.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
sckey = os.environ.get("PUSHPLUS", "")

# 推送内容
title = "Glados"
success, fail = 0, 0 # 成功账号数量 失败账号数量
title = ""
success, fail, repeats = 0, 0, 0 # 成功账号数量 失败账号数量 重复签到账号数量
sendContent = ""

# glados账号cookie 直接使用数组 如果使用环境变量需要字符串分割一下
Expand Down Expand Up @@ -48,6 +48,7 @@
leftdays = int(float(result['data']['leftDays']))
# 获取账号email
email = result['data']['email']

print(status)
if "Checkin!" in status:
success += 1
Expand All @@ -68,9 +69,11 @@
message_days = "获取信息失败"

# 推送内容
sendContent += f"{'-'*30}\n\
sendContent += f"{status}\n\
{'-'*30}\n\
账号: {email}\n\
签到情况: {message_status}\n\
status字段: {status}\n\
剩余天数: {message_days}\n"

if cookie == cookies[-1]:
Expand All @@ -79,7 +82,7 @@
# --------------------------------------------------------------------------------------------------------#
print("sendContent:" + "\n", sendContent)
if sckey != "":
title += f': 成功{success},失败{fail}'
title += f'成功{success},失败{fail},重复{repeats}'
plusurl = f"http://www.pushplus.plus/send?token={sckey}&title={title}&content={sendContent}"
r = requests.get(plusurl)
print(r.status_code)

0 comments on commit f018437

Please sign in to comment.