feat(log): add logger

This commit is contained in:
MingxuanGame
2025-07-28 10:38:40 +00:00
parent e369944d87
commit 1be3388524
13 changed files with 212 additions and 174 deletions

View File

@@ -3,10 +3,14 @@ from __future__ import annotations
from ._base import BaseFetcher
from httpx import AsyncClient
from loguru import logger
class OsuDotDirectFetcher(BaseFetcher):
async def get_beatmap_raw(self, beatmap_id: int) -> str:
logger.opt(colors=True).debug(
f"<blue>[OsuDotDirectFetcher]</blue> get_beatmap_raw: <y>{beatmap_id}</y>"
)
async with AsyncClient() as client:
response = await client.get(
f"https://osu.direct/api/osu/{beatmap_id}/raw",