1
0
mirror of https://github.com/6dylan6/jdpro.git synced 2026-05-01 09:36:41 +08:00

Compare commits

...

4 Commits

Author SHA1 Message Date
6dylan6 30e830936c Merge pull request #204 from quewen08/main
1
2024-01-13 00:01:40 +08:00
2024 1c7380f623 1 2024-01-12 22:04:24 +08:00
quewen08 fd19b8b382 Merge branch '6dylan6:main' into main 2024-01-11 09:50:39 +08:00
que c163a74a6a 👽 🐛 [jd试用] 支持新版青龙面板文件 2024-01-10 10:21:19 +08:00
2 changed files with 13 additions and 5 deletions
+11 -2
View File
@@ -58,8 +58,17 @@ def printf(text):
def get_remarkinfo():
url='http://127.0.0.1:5600/api/envs'
try:
with open('/ql/config/auth.json', 'r') as f:
token=json.loads(f.read())['token']
path = '/ql/config/auth.json' # 设置青龙 auth文件地址
if not os.path.isfile(path):
path = '/ql/data/config/auth.json' # 尝试设置青龙 auth 新版文件地址
if os.path.isfile(path): # 进行文件真值判断
with open(path, "r") as file: # 上下文管理
auth = file.read() # 读取文件
file.close() # 关闭文件
auth = json.loads(auth) # 使用 json模块读取
# with open('/ql/config/auth.json', 'r') as f:
# token=json.loads(f.read())['token']
token = auth["token"] # 提取 authkey
headers={
'Accept':'application/json',
'authorization':'Bearer '+token,
+2 -3
View File
File diff suppressed because one or more lines are too long