feat(fetcher): add data fetcher

This commit is contained in:
MingxuanGame
2025-07-26 16:06:53 +08:00
parent 585cb9d98a
commit cca4a2f1be
13 changed files with 880 additions and 639 deletions

View File

@@ -8,7 +8,7 @@ from __future__ import annotations
import os
from dotenv import load_dotenv
import requests
import httpx as requests
# 加载 .env 文件
load_dotenv()
@@ -173,7 +173,7 @@ def main():
scores_data = get_beatmap_scores(token_data["access_token"], 1)
if scores_data:
print(f"谱面成绩总数: {len(scores_data['scores'])}")
if scores_data['userScore']:
if scores_data["userScore"]:
print("用户在该谱面有成绩记录")
print(f"用户成绩 ID: {scores_data['userScore']['id']}")
print(f"用户成绩分数: {scores_data['userScore']['total_score']}")
@@ -196,4 +196,4 @@ def main():
if __name__ == "__main__":
main()
main()