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":"已经签过到了"}
{"code":-1,"msg":"未登录"}
输出没有推送到server酱,不知道出在什么问题上
发送消息非常简单,只需要向以下URL发一个GET或者POST请求:
https://sc.ftqq.com/SCU178542T4c ... 760c9fdbc12e3f.send
接受两个参数:
text:消息标题,最长为256,必填。
desp:消息内容,最长64Kb,可空,支持MarkDown。
最简单的消息发送方式是通过浏览器,在地址栏输入以下URL,回车后即可发送:
https://sc.ftqq.com/SCU178542T4c ... dbc12e3f.send?text=主人服务器又挂掉啦~