From 260fbc8a05ac1fca9442a8b39ebbd761c4381671 Mon Sep 17 00:00:00 2001 From: Womsxd <45663319+Womsxd@users.noreply.github.com> Date: Wed, 4 Aug 2021 15:43:55 +0800 Subject: [PATCH] clear_cookies --- login.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/login.py b/login.py index cfcbe79..4acc685 100644 --- a/login.py +++ b/login.py @@ -6,6 +6,7 @@ import setting def login(): if (config.mihoyobbs_Cookies == ''): log.error("请填入Cookies!") + config.Clear_cookies() exit(1) temp_Cookies = {} if "login_ticket" in config.mihoyobbs_Cookies: @@ -24,7 +25,9 @@ def login(): config.Save_config() else: log.error("cookie已失效,请重新登录米游社抓取cookie") + config.Clear_cookies() exit(1) else: log.error("cookie中没有'login_ticket'字段,请重新登录米游社,重新抓取cookie!") + config.Clear_cookies() exit(1) \ No newline at end of file