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