diff --git a/main.py b/main.py index b3b4c79..22403d0 100644 --- a/main.py +++ b/main.py @@ -22,9 +22,14 @@ def save_data(): if __name__ == '__main__': - user_info = Request.get_login_user_info() - user_nickname = user_info[Request.uin][6] - print(f"用户<{Request.uin}>,<{user_nickname}>登录成功") + try: + Config.init_flooder() + user_info = Request.get_login_user_info() + user_nickname = user_info[Request.uin][6] + print(f"用户<{Request.uin}>,<{user_nickname}>登录成功") + except Exception as e: + print(f"登录失败:请重新登录,错误信息:{str(e)}") + exit(0) texts = [] try: diff --git a/util/ConfigUtil.py b/util/ConfigUtil.py index 1fb71c0..2bf45ff 100644 --- a/util/ConfigUtil.py +++ b/util/ConfigUtil.py @@ -45,7 +45,7 @@ def read_files_in_folder(): # 选择文件 while True: try: - choice = int(input("请选择要登录的用户序号: ")) + choice = int(input("请选择要登录的用户序号,重新登录输入0: ")) if 1 <= choice <= len(files): break elif choice == 0: