mirror of
https://github.com/PaiGramTeam/SIMNet.git
synced 2024-11-21 21:58:05 +00:00
🐛 Fix query hk4e token by cookie token
This commit is contained in:
parent
70b683268b
commit
83680dc77d
@ -206,5 +206,6 @@ class AuthClient(BaseClient):
|
||||
"game_biz": game_biz,
|
||||
"uid": self.player_id or player_id,
|
||||
"region": region,
|
||||
"lang": self.lang,
|
||||
}
|
||||
await self.request_lab(url, data=json)
|
||||
await self.request_api("POST", url=url, json=json)
|
||||
|
@ -35,6 +35,8 @@ class GenshinWishClient(BaseWishClient):
|
||||
List[Wish]: A list of GenshinWish objects representing the retrieved wishes.
|
||||
"""
|
||||
banner_types = banner_types or [100, 200, 301, 302]
|
||||
if isinstance(banner_types, int):
|
||||
banner_types = [banner_types]
|
||||
banner_names = await self.get_banner_names(game=Game.GENSHIN, lang=lang, authkey=authkey)
|
||||
wishes = []
|
||||
for banner_type in banner_types:
|
||||
@ -48,6 +50,6 @@ class GenshinWishClient(BaseWishClient):
|
||||
),
|
||||
)
|
||||
items = await paginator.get(limit)
|
||||
banner_name = banner_names[banner_type]
|
||||
banner_name = banner_names[banner_type] if banner_type != 400 else banner_names[301]
|
||||
wishes.extend([Wish(**i, banner_name=banner_name) for i in items])
|
||||
return sorted(wishes, key=lambda wish: wish.time.timestamp())
|
||||
|
@ -36,6 +36,8 @@ class StarRailWishClient(BaseWishClient):
|
||||
List[StarRailWish]: A list of StarRailWish objects representing the retrieved wishes.
|
||||
"""
|
||||
banner_types = banner_types or [1, 2, 11, 12]
|
||||
if isinstance(banner_types, int):
|
||||
banner_types = [banner_types]
|
||||
wishes = []
|
||||
for banner_type in banner_types:
|
||||
paginator = WishPaginator(
|
||||
|
@ -198,7 +198,7 @@ RECORD_URL = InternationalRoute(
|
||||
GACHA_INFO_URL = GameRoute(
|
||||
overseas=dict(
|
||||
genshin="https://hk4e-api-os.hoyoverse.com/event/gacha_info/api",
|
||||
hkrpg="",
|
||||
hkrpg="https://api-os-takumi.mihoyo.com/common/gacha_record/api/",
|
||||
),
|
||||
chinese=dict(
|
||||
genshin="https://hk4e-api.mihoyo.com/event/gacha_info/api",
|
||||
|
Loading…
Reference in New Issue
Block a user