This commit is contained in:
qsc
2025-11-11 14:07:03 +08:00
parent 64580773a8
commit 2ee604d253
2 changed files with 7 additions and 5 deletions
+2 -2
View File
@@ -24,9 +24,9 @@
} }
}, },
"jx3_kaifu":{ "jx3_kaifu":{
"url":"https://www.jx3api.com/data/server/status", "url":"https://www.jx3api.com/data/server/check",
"method":"GET", "method":"GET",
"description":"获取剑网三技能记录", "description":"剑网三开服查询",
"params":{ "params":{
"server": "梦江南" "server": "梦江南"
} }
+5 -3
View File
@@ -88,10 +88,12 @@ class JX3Function:
# 处理返回数据 # 处理返回数据
try: try:
status = data.get("status") status = data.get("status")
if status == "正常" or status == "繁忙" or status == "爆满": status_time = datetime.fromtimestamp(data.get("time")).strftime("%Y-%m-%d %H:%M:%S")
status_str = f"{server}服务器当前{status},快冲,快冲!" if status == 1:
status_str = f"{server}服务器已开服,快冲,快冲!\n开服时间:{status_time}"
else: else:
status_str = f"{server}服务器当前维护中,等会再来吧!" status_str = f"{server}服务器当前维护中,等会再来吧!\n上次开服时间:{status_time}"
return_data["data"] = status_str return_data["data"] = status_str
return_data["code"] = 200 return_data["code"] = 200
except Exception as e: except Exception as e: