mirror of
https://github.com/Cp0204/quark-auto-save.git
synced 2026-01-12 07:10:44 +08:00
🐛 修复目录路径拼接无 / 开头问题 #44
This commit is contained in:
parent
b21c75e125
commit
95d1449651
@ -173,10 +173,10 @@ class Alist:
|
|||||||
"GET", url, headers=headers, params=querystring
|
"GET", url, headers=headers, params=querystring
|
||||||
).json()
|
).json()
|
||||||
if response["code"] == 0:
|
if response["code"] == 0:
|
||||||
file_names = [
|
path = ""
|
||||||
item["file_name"] for item in response["data"]["full_path"]
|
for item in response["data"]["full_path"]:
|
||||||
]
|
path = f"{path}/{item['file_name']}"
|
||||||
return "/".join(file_names)
|
return path
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"Alist刷新: 获取Quark路径出错 {e}")
|
print(f"Alist刷新: 获取Quark路径出错 {e}")
|
||||||
return ""
|
return ""
|
||||||
|
|||||||
@ -198,10 +198,10 @@ class Alist_strm_gen:
|
|||||||
"GET", url, headers=headers, params=querystring
|
"GET", url, headers=headers, params=querystring
|
||||||
).json()
|
).json()
|
||||||
if response["code"] == 0:
|
if response["code"] == 0:
|
||||||
file_names = [
|
path = ""
|
||||||
item["file_name"] for item in response["data"]["full_path"]
|
for item in response["data"]["full_path"]:
|
||||||
]
|
path = f"{path}/{item['file_name']}"
|
||||||
return "/".join(file_names)
|
return path
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"Alist-Strm生成: 获取Quark路径出错 {e}")
|
print(f"Alist-Strm生成: 获取Quark路径出错 {e}")
|
||||||
return ""
|
return ""
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user