Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

August 2024 no longer returning data from HowLongToBeat.com #25

Closed
ScrappyCocco opened this issue Aug 2, 2024 Discussed in #24 · 8 comments · Fixed by #26
Closed

August 2024 no longer returning data from HowLongToBeat.com #25

ScrappyCocco opened this issue Aug 2, 2024 Discussed in #24 · 8 comments · Fixed by #26
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@ScrappyCocco
Copy link
Owner

Discussed in #24

Originally posted by yipidee August 2, 2024
I've been using howlongtobeatpy in a script with no problems for some time now, but suddenly it has started returning "None" for any search term. HowLongToBeat is up and running, has the API been broken by some change?

@ScrappyCocco ScrappyCocco added the bug Something isn't working label Aug 2, 2024
@ScrappyCocco ScrappyCocco self-assigned this Aug 2, 2024
@ScrappyCocco
Copy link
Owner Author

Hello and thank you for the Issue @yipidee

The library is (at least temporarily) fixed on howlongtobeatpy 1.0.6

It looks like the search url changed from
"api/search"
to
"api/search" + "/4b4cbe570602c88660f7df8ea0cb6b6e"

This code looks like a hash of some kind but I investigated just a little and it doesn't looks like it's user-generated
I tried to open the website from a different pc in a completely different network (different IP) and it was still that one
So maybe it's a random-access token and they're going to change it every X-time? In that case we need to figure out where is it received on the client and to gather that too for the api to work correctly

This need to be checked so I'm going to leave the issue on hold for a while

@yipidee
Copy link

yipidee commented Aug 2, 2024

Issue fixed in 1.0.6

@cpresse
Copy link

cpresse commented Aug 4, 2024

Had the same issue today and 1.0.6 fixed it right away. Looks good! Thank you.

@tlt21
Copy link

tlt21 commented Aug 7, 2024

Looks like it got updated again, the search guid is now "ac8bb4dd1834c9056f6f6a0294fdb1b4"

@ScrappyCocco
Copy link
Owner Author

Ok so it changes every now and then and it can't be hardcoded like that, it must be read somewhere from the website like the browser does
I am not available to update it now, I'll have a look at it at the end of the month, I am sorry

@ScrappyCocco
Copy link
Owner Author

Also that /search/key looks like to be generated or loaded inside a js like https://howlongtobeat.com/_next/static/chunks/pages/_app-dbc6a57c887f99a6.js that doesn't seems stable url to read it, so a solution is not immediate either

@ScrappyCocco
Copy link
Owner Author

I'm doing some tests in this branch https://github.com/ScrappyCocco/HowLongToBeat-PythonAPI/tree/FetchApiKey (PR #25) reading the api key from the website and it looks like it works fine, could publish a new version soon

@ScrappyCocco
Copy link
Owner Author

All tests are green, version 1.0.7 fetch the api key from the website so it could be a bit slower but should work fine for a longer time (hopefully)

I used a new method to publish the package on pypi so if there are problems please let me know

https://pypi.org/project/howlongtobeatpy/1.0.7/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants