使用随机设备,优化显示,优化大量文件的文件夹处理

This commit is contained in:
Qing 2024-10-01 13:10:26 +08:00
parent 48df83420b
commit c888c0e3f7

View File

@ -884,15 +884,14 @@ class Pan123:
with open("123pan.txt", "r", encoding="utf-8") as f: with open("123pan.txt", "r", encoding="utf-8") as f:
text = f.read() text = f.read()
text = json.loads(text) text = json.loads(text)
user_name = text["userName"]
pass_word = text["passWord"]
authorization = text["authorization"]
# 读取设备信息
deviceType = text["deviceType"] deviceType = text["deviceType"]
osVersion = text["osVersion"] osVersion = text["osVersion"]
self.devicetype = deviceType self.devicetype = deviceType
self.osversion = osVersion self.osversion = osVersion
# 读取设备信息
user_name = text["userName"]
pass_word = text["passWord"]
authorization = text["authorization"]
except: # FileNotFoundError or json.decoder.JSONDecodeError: except: # FileNotFoundError or json.decoder.JSONDecodeError:
print("获取配置失败,重新输入") print("获取配置失败,重新输入")