Closed binchoo closed 2 years ago
Looks to me like these are broken too?
404: https://api-os-takumi.hoyoverse.com/community/misc/wapi/langs?gids=2
broken? https://api-os-takumi.hoyoverse.com/community/post/api/forumHotPostFullList
I did not deal with CN endpoints
yeah those are completely broken for both genshinstats and genshin.py
@thesadru
Thanks for your checking. I reviewed my test and as you said get_langs()
and get_hot_spots()
were broken with hoyoverse.
get_langs()
fails with hoyoverse.com.
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://api-os-
takumi.hoyoverse.com/community/misc/wapi/langs?gids=2
get_hot_spots()
returns zero length data with hoyoverse.com.
Expected :100
Actual :0
<Click to see difference>
def test_hot_posts():
hot_posts = gs.get_hot_posts(size=120)
> assert len(hot_posts) > 100
E assert 0 > 100
E + where 0 = len([])
I fixed these to use mihoyo.com.
However, it turns out that 3 out of 6 os-takumi-hoyoverse endpoints are not functioning, which makes it unreliable.
We may let OS_TAKUMI_URL
be https://api-os-takumi.mihoyo.com
as before.
I used that approach in genshin.py so I'm all for doing it here too. 👍
I'm done with it too :)
Article
Presenting the New Brand HoYoverse: Aiming to Provide Global Players With an Immersive Virtual World Experience
Overview
Yesterday, miHoYo introduced its new brand name, 'HoYoverse'. Its endpoints are now extended to use
hoyoverse.com
.Providing an alias domain to existing one is quite easy, so
mihoyo.com
endpoints are still functioning as normal. That being said, it is possible that they may disappear in the distant future.Replacing endpoint urls
To cope with brand new hoyoverse.com, I changed URLs in genshinstats to alternatively use
hoyoverse.com
, only if the method using the altered url had passed its test case.I did not deal with CN endpoints, because no chinese test account was available to me.
Test Results
search()
works only withmihoyo.com
endpoint.redeem_code()
was not functioning with bothmihoyo.com
andhoyoverse.com
endpoints.Except these two failing cases, OS endpoints are now of 'hoyoverse.com'.