Skip to content

Commit

Permalink
<jx3>[feat]试炼区服支持别名
Browse files Browse the repository at this point in the history
  • Loading branch information
HornCopper committed Jul 27, 2024
1 parent 73d37ac commit 1c47ba3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/plugins/jx3/rank/api.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from typing import Union
from src.tools.config import Config
from src.tools.utils.request import get_api
from src.tools.basic.data_server import server_mapping
Expand Down Expand Up @@ -43,6 +44,9 @@ async def sl_rank_(server: str, group_id: str, school: str = None):
return data["data"]["url"]
else:
# 区服试炼榜单
server: Union[str, None] = server_mapping(server, group_id)
if server == None:
return [PROMPT.ServerNotExist]
final_url = f"{Config.jx3.api.url}/view/rank/statistical?token={token}&nickname={bot_name}&server={server}&table=试炼&name={school}&chrome=1"
data = await get_api(final_url)
if data["code"] == 400:
Expand Down

0 comments on commit 1c47ba3

Please sign in to comment.