thesadru / genshinstats

PLEASE USE GENSHIN.PY A python library that can get the stats of Genshin Impact players using Mihoyo's API. PLEASE USE GENSHIN.PY
https://thesadru.github.io/pdoc/genshinstats/
MIT License
265 stars 38 forks source link

Coping with the new mihoyo's brand name #63

Closed binchoo closed 2 years ago

binchoo commented 2 years ago

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

image

Except these two failing cases, OS endpoints are now of 'hoyoverse.com'.

thesadru commented 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

binchoo commented 2 years ago

@thesadru Thanks for your checking. I reviewed my test and as you said get_langs() and get_hot_spots() were broken with hoyoverse. image

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.

thesadru commented 2 years ago

https://api-os-takumi.mihoyo.com

I used that approach in genshin.py so I'm all for doing it here too. 👍

binchoo commented 2 years ago

I'm done with it too :) image