mirror of
https://github.com/baiqwerdvd/StarRailUID.git
synced 2025-05-07 12:43:25 +08:00
✨面板查询带上UA
This commit is contained in:
parent
f787539051
commit
d5de4b7efb
@ -4,12 +4,15 @@ from typing import Dict
|
||||
|
||||
from httpx import AsyncClient
|
||||
|
||||
from ..utils import _HEADER
|
||||
|
||||
# from .models import EnkaData
|
||||
|
||||
|
||||
async def get_char_card_info(uid: str) -> Dict:
|
||||
async with AsyncClient(
|
||||
base_url='http://api.mihomo.me',
|
||||
headers=_HEADER,
|
||||
timeout=30,
|
||||
) as client:
|
||||
req = await client.get(f'/sr_info/{uid}')
|
||||
|
3
StarRailUID/sruid_utils/api/utils.py
Normal file
3
StarRailUID/sruid_utils/api/utils.py
Normal file
@ -0,0 +1,3 @@
|
||||
from gsuid_core.version import __version__
|
||||
|
||||
_HEADER = {'User-Agent': f'StarRailUID/{__version__}'}
|
Loading…
x
Reference in New Issue
Block a user