From 98410badc3bfe047ffc96a733ae9c9592aa121bb Mon Sep 17 00:00:00 2001 From: shitao <133397418@qq.com> Date: Sat, 6 Mar 2021 13:29:49 +0800 Subject: [PATCH] =?UTF-8?q?:bug:=20=E4=BF=AE=E5=A4=8D=E5=90=BE=E7=88=B1?= =?UTF-8?q?=E7=A0=B4=E8=A7=A3=E8=8E=B7=E5=8F=96=E4=B8=8D=E5=88=B0=E7=94=A8?= =?UTF-8?q?=E6=88=B7=20uid=20=E5=AF=BC=E8=87=B4=E5=8F=AF=E8=83=BD=E7=AD=BE?= =?UTF-8?q?=E5=88=B0=E5=A4=B1=E8=B4=A5=E7=9A=84=20BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pojie/pojie.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pojie/pojie.py b/pojie/pojie.py index e5739fd..7f89178 100644 --- a/pojie/pojie.py +++ b/pojie/pojie.py @@ -38,7 +38,11 @@ class PojieCheckIn: "Cookie": pojie_cookie, "ContentType": "text/html;charset=gbk", } - uid = re.findall(r"htVD_2132_lastcheckfeed=(.*?);", pojie_cookie)[0].split("%7C")[0] + try: + uid = re.findall(r"htVD_2132_lastcheckfeed=(.*?);", pojie_cookie)[0].split("%7C")[0] + except Exception as e: + print(e) + uid = "未获取到用户 uid" sign_msg = self.sign(headers=headers) msg = f"帐号信息: {uid}\n签到状态: {sign_msg}" return msg