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

scrape search key for every request #64

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Jan540
Copy link

@Jan540 Jan540 commented Aug 27, 2024

As mentioned in #63 the search url changed.

It now requires a "api key" when searching for games: api/search/<search_key>. This key gets refreshed every now and then and can be scraped out of one of their scripts. I have implemented the basic functionality of fetching the key before every request based on how it was done in ScrappyCocco/HowLongToBeat-PythonAPI#25.

I also noticed that Dark Souls only has 3 platforms. The test required 4. -> I have gone and changed the test.

xavdid added a commit to xavdid/howlongtobeat that referenced this pull request Aug 30, 2024
mostly a copy of ckatzorke#64,
plus a typescript upgrade
@xavdid
Copy link

xavdid commented Aug 30, 2024

I copied your PR for my fork, thank you for that!

FWIW, you can load the API key lazily rather than on every request (if you store it on the class): xavdid@5375d74#diff-1af9a3390b92891b019f2dbae92c77ca7d05282003849d5642715613e809ab54R89

@shuffgy
Copy link

shuffgy commented Nov 24, 2024

i used your forks for a while but this doesnt seem to work anymore so i guess this PR needs some updates?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants