Skip to content

Commit

Permalink
Fix daily check-in for Miyoushe Genshin not working
Browse files Browse the repository at this point in the history
  • Loading branch information
seriaati committed May 4, 2024
1 parent 7e0d98a commit 7a124d9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
15 changes: 4 additions & 11 deletions genshin/client/components/daily.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import datetime
import functools
import typing
import uuid

import aiohttp.typedefs

Expand Down Expand Up @@ -60,17 +59,11 @@ async def request_daily_reward(
params["region"] = utility.recognize_server(uid, game)

# most of the extra headers are likely just placebo
headers["x-rpc-app_version"] = "2.34.1"
headers["x-rpc-app_version"] = "2.60.1"
headers["x-rpc-client_type"] = "5"
headers["x-rpc-device_id"] = str(uuid.uuid4())
headers["x-rpc-sys_version"] = "12"
headers["x-rpc-platform"] = "android"
headers["x-rpc-channel"] = "miyousheluodi"
headers["x-rpc-device_model"] = str(self.hoyolab_id) or ""
headers["referer"] = (
"https://webstatic.mihoyo.com/bbs/event/signin-ys/index.html?"
"bbs_auth_required=true&act_id=e202009291139501&utm_source=bbs&utm_medium=mys&utm_campaign=icon"
)
headers["x-rpc-signgame"] = "hk4e"
headers["referer"] = "https://webstatic.mihoyo.com/"
headers["origin"] = "https://webstatic.mihoyo.com/"

headers["ds"] = ds_utility.generate_dynamic_secret(constants.DS_SALT["cn_signin"])

Expand Down
2 changes: 1 addition & 1 deletion genshin/client/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ def get_url(self, region: types.Region, game: types.Game) -> yarl.URL:
hkrpg="https://sg-public-api.hoyolab.com/event/luna/os?act_id=e202303301540311",
),
chinese=dict(
genshin="https://api-takumi.mihoyo.com/event/bbs_sign_reward/?act_id=e202009291139501",
genshin="https://api-takumi.mihoyo.com/event/luna/?act_id=e202311201442471",
honkai3rd="https://api-takumi.mihoyo.com/event/luna/?act_id=e202207181446311",
hkrpg="https://api-takumi.mihoyo.com/event/luna/?act_id=e202304121516551",
),
Expand Down

0 comments on commit 7a124d9

Please sign in to comment.