代码拉取完成,页面将自动刷新
同步操作将从 半冷半酷半成熟/glados-checkin 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
import requests,json,os
# server酱开关,填off不开启(默认),填on同时开启cookie失效通知和签到成功通知
sever = os.environ["SERVE"]
# 填写server酱sckey,不开启server酱则不用填
sckey = os.environ["SCKEY"]
#'SCU89402Tf98b7f01ca3394b9ce9aa5e2ed1abbae5e6ca42796bb9'
# 填入glados账号对应cookie
cookie = os.environ["COOKIE"]
#'__cfduid=d3459ec306384ca67a65170f8e2a5bd561593049467; _ga=GA1.2.766373509.1593049472; _gid=GA1.2.1338236108.1593049472; koa:sess=eyJ1c2VySWQiOjQxODMwLCJfZXhwaXJlIjoxNjE4OTY5NTI4MzY4LCJfbWF4QWdlIjoyNTkyMDAwMDAwMH0=; koa:sess.sig=6qG8SyMh_5KpSB6LBc9yRviaPvI'
def start():
url= "https://glados.rocks/api/user/checkin"
url2= "https://glados.rocks/api/user/status"
referer = 'https://glados.rocks/console/checkin'
checkin = requests.post(url,headers={'cookie': cookie ,'referer': referer })
state = requests.get(url2,headers={'cookie': cookie ,'referer': referer})
# print(res)
if 'message' in checkin.text:
mess = checkin.json()['message']
time = state.json()['data']['leftDays']
time = time.split('.')[0]
#print(time)
if sever == 'on':
requests.get('https://sc.ftqq.com/' + sckey + '.send?text='+mess+',you have '+time+' days left')
else:
requests.get('https://sc.ftqq.com/' + sckey + '.send?text=cookie过期')
def main_handler(event, context):
return start()
if __name__ == '__main__':
start()
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。