优化逻辑

This commit is contained in:
LibraHp_0928 2024-02-14 09:12:18 +08:00
parent 557754211d
commit e766ed521a
2 changed files with 9 additions and 4 deletions

11
main.py
View File

@ -22,9 +22,14 @@ def save_data():
if __name__ == '__main__': if __name__ == '__main__':
user_info = Request.get_login_user_info() try:
user_nickname = user_info[Request.uin][6] Config.init_flooder()
print(f"用户<{Request.uin}>,<{user_nickname}>登录成功") 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 = [] texts = []
try: try:

View File

@ -45,7 +45,7 @@ def read_files_in_folder():
# 选择文件 # 选择文件
while True: while True:
try: try:
choice = int(input("请选择要登录的用户序号: ")) choice = int(input("请选择要登录的用户序号重新登录输入0: "))
if 1 <= choice <= len(files): if 1 <= choice <= len(files):
break break
elif choice == 0: elif choice == 0: