马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
本帖最后由 cc1236 于 2021-6-22 19:41 编辑 import requests
SCKEY = '666'
url2 = 'https://api.tokyo.biliob233.com/user/check-in'
cookie2 = 666'
def it():
headers = {
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36', 'cookie': cookie2
}
res = requests.post(url=url2, headers=headers).text
print(res)
# 微信推送
def pushWechat(desp, nowtime):
ssckey = SCKEY
send_url = 'https://sc.ftqq.com/' + ssckey + '.send'
if '登录' in desp:
params = {
'text': 'WPS小程序签到失败提醒' + nowtime,
'desp': desp
}
else:
params = {
'text': 'WPS小程序签到提醒' + nowtime,
'desp': desp
}
requests.post(send_url, params=params)
f = open('bilibiliob.txt', 'w+', encoding='utf-8')
f.write(res)
f.close()
desp2 = 'bilibiliob.txt'
desp = desp2.read() # 读取数据
pushWechat(desp, nowtime)
return desp
def main_handler(event, context):
return it()
if __name__ == '__main__':
it()
{"code":-1,"msg":"已经签过到了"}
server酱
|