-
Notifications
You must be signed in to change notification settings - Fork 17
Update HLTB for Steam to v1.1.1 #113
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
Conversation
|
There has to be a better solution to hard-coding names. I haven't looked into it at all, but why couldn't you just search by appid instead of the game name? |
|
Yeah, I looked into it when doing the initial dev and nothing exists. HLTB provides no official API. Wrappers in other languages are name based lookup only, e.g. My Lua backend is based on porting over the python wrapper for the most part. The funny thing is that HLTB has the Steam IDs internally, but you can only obtain them after finding the game first by name. So one approach would be to scrape it, add results to your own db, and then query that by SteamID. Pretty fragile and adds hosting needs which I'm not interested in. The simplest option would be to find a reliable third party that scrapes and hosts a DB for querying. I'm not super worried about the scaling though. Two thoughts:
|
|
You could keep your current algorithm, and when you think you found the game, check its HLTB id against their price API: Of course there is more overhead here, but it would be a lot more accurate and likely would never require more than 2 tries. |
|
Check SteamID for validation - 100% agreed, I already do that. Btw IsThereAnyDeal API has some HLTB data but it is for internal use only. I've reached out to their team but it is going to remain for internal (first-party) use only for the foreseeable future. |
|
You can actually query your entire Steam library at once too, with appid's provided. Endpoint: https://howlongtobeat.com/api/steam/getSteamImportData {
"steamUserId": "your profile id, ex: ShadowMonster70",
"steamOmitData":0
}I don't know everything you need, but this seems like a solid solution. |
|
Oh that's an interesting find. Certainly spits out a lot of data. I'll look into it. Sample cmd: |
|
Ah I guess the limitation will be that your profile needs to be public. Where did you find that endpoint btw? |
|
Ah yeah, true; that's subpar. I found it on the website: |
|
Got it. I'll play around with that new endpoint. If the current user profile is public we could just use that I believe. And then for non-public profiles, which I want to support, that endpoint could help to automate the name correction lookup stuff. All definitely in the future work bucket, needs some experimentation. |
|
I'm converting to draft because I'm working to add the pre-fetch step using that new HLTB endpoint you found. New approach: Based on that endpoint I was able to query the libraries of the largest Steam users and add additional name fixes via a script. And it wasn't actually that many. ~250 total based on the whale libraries. So I think we will be in good shape after this. Probably will get something out tonight before work starts again for the week. |
|
Closing this one and opening 1.2.0 because it's a significant enough change |
Updates the HLTB for Steam plugin submodule to v1.1.1.
Minor update to make it easier for users to contribute name fixes.
Changes