From 2ee604d25322422ea1b9a6dda7cfc4a62cb7aa1d Mon Sep 17 00:00:00 2001 From: qsc Date: Tue, 11 Nov 2025 14:07:03 +0800 Subject: [PATCH] 1 --- api_config.json | 4 ++-- core/cless_jx3.py | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/api_config.json b/api_config.json index d9faab0..8c810d0 100644 --- a/api_config.json +++ b/api_config.json @@ -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": "梦江南" } diff --git a/core/cless_jx3.py b/core/cless_jx3.py index c710467..75d946d 100644 --- a/core/cless_jx3.py +++ b/core/cless_jx3.py @@ -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: