From 88ca48f4f7f163aea66bdeef15dfe5a16fa5e526 Mon Sep 17 00:00:00 2001 From: GamerNoTitle Date: Sat, 5 Dec 2020 19:47:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=94=99=E8=AF=AF=E6=8F=90?= =?UTF-8?q?=E7=A4=BA=E5=B9=B6=E6=8E=A8=E9=80=81=E9=80=9A=E7=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index 6d57ebd..d1a17c1 100644 --- a/main.py +++ b/main.py @@ -71,6 +71,10 @@ def scsend(SCKEY,message): if sc_enable: r.get(url=sc_url) +class ScriptError(Exception): + print("[网易云游戏自动签到]脚本发生错误,请查看运行记录!") + + if __name__ == "__main__": me=getme(current,getheader) if(me.status_code!=200): @@ -78,7 +82,7 @@ if __name__ == "__main__": send(teleid,message) scsend(sckey,message) print(message) - sys.exit() + raise ScriptError sign=signin(sign,signheader) if(sign.status_code==200): message='[网易云游戏自动签到]签到成功!' @@ -90,4 +94,4 @@ if __name__ == "__main__": send(teleid,message) scsend(sckey,message) print(message) - sys.exit() + raise(ScriptError)