From 71fcf6183de18c5b40ced5a27a9ed3745edc3f5b Mon Sep 17 00:00:00 2001 From: GamerNoTitle Date: Sun, 22 Sep 2024 18:16:40 +0800 Subject: [PATCH] update --- app/main.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/main.py b/app/main.py index c53b809..822c33d 100644 --- a/app/main.py +++ b/app/main.py @@ -19,15 +19,15 @@ USERNAME = "".join(random.sample(ascii_list, 7)).upper() VERSION = 2024100 BUILD_NUMBER = "2024.1.4+Build+CL-241.18034.45" -# 配置静态文件 +# Configure static files app.mount("/static", StaticFiles(directory="app/static"), name="static") -# 获取并解析 XML 响应 +# Parse xml response def get_xml_data(server: str, ticket_path: str): client = httpx.Client(verify=False) try: - response = client.get(server + ticket_path, timeout=3) # 设置超时为10秒 - response.raise_for_status() # 检查响应状态 + response = client.get(server + ticket_path, timeout=3) # timeout 3 sec + response.raise_for_status() # check status root = ET.fromstring(response.text) return {