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': 'bilibiliob 签到失败提醒' + nowtime,
                'desp': desp
            }
        else:
            params = {
                'text': 'bilibiliob 签到提醒' + 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":"未登录"}
我想让程序检测到”登录“这个词出现时,发送失败提醒,否则签到成功提醒,不知道是不是因为没写入还是 desp 没读取,反正没有推送
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
     https://www.v2ex.com/t/785413
      V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
      V2EX is a community of developers, designers and creative people.