1
0
mirror of https://github.com/hanxi/xiaomusic.git synced 2025-12-16 16:38:16 +08:00

优化下载json文件逻辑

This commit is contained in:
涵曦
2024-06-26 10:14:11 +00:00
parent 925b52d979
commit 2a22b00d53

View File

@@ -154,8 +154,9 @@ def downloadjson():
data = request.get_json()
log.info(data)
url = data["url"]
ret, content = downloadfile(url)
if ret != "OK":
retmsg, content = downloadfile(url)
ret = "OK"
if retmsg != "OK":
log.warning(f"downloadjson failed. url:{url} ret:{ret}")
ret = "Download JSON file failed."
return {