Nebukam / steam-game-finder

Steam : Game Finder is a small app/browser extension allowing a group of Steam users to find out which games they have in common, and who is left out; as well as filtering their shared libraries content to find what to play next.
MIT License
34 stars 3 forks source link

Add Steam recent/all review count, positive/negative ratio and release date filters #6

Open andrasfuchs opened 2 years ago

andrasfuchs commented 2 years ago

This extension is still one of my favorites, and it's a lot of fun to use when I look for a game to play with my gamer friends.

If it was not too difficult add, it would be great to have a few more filters for reviews and game release date.

Ideally we would have a filter for minimum review count, minimum positive/all ratio, recent x-day or all-time review selection.

Another filter option would be the release date, ideally with a range slider stopping at not just the years, but quarters too, so that we could filter the games for example between 2021Q3 and 2020Q1.

Thank you for you efforts!

Nebukam commented 2 years ago

Date has been requested over at reddit too, so that's definitely something I'll add!
I'm currently busy with another project and the game finder needs some adjustments so I should get back on that around the end of April ^_^

Review filters on the other hand is tricky. Not only I failed to crawl the data, but it's also a very "living" stat, and the app is working with a (not updated often enough) cache. So while it's possible to add the feature, it'll be very misleading for recently released games. I'll look into it nonetheless, but don't get your hopes up for this one ;)

andrasfuchs commented 2 years ago

Great, thank you for the explanation!

Would it be possible to fetch review data just like you do with the price on the client side?

Would it be easier to get the data from steamdb.info? image

My guess is that we couldn't make review filters for the games this way, but we could still see the up-to-date ratings if we opened the game details/price panel.

I don't know if it is possible, it's just a thought ;)

Nebukam commented 2 years ago

It would be possible to fetch the review data "on-demand" but won't be usable along with filters. Technically I could fetch all the data on the client side, but that's way too many requests to the Steam website and will end up with a 429 error super fast (that's why I ended up using a cache). It also makes everything very sluggish ^^

So yes, definitely a go for the on-demand.

Regarding streamdb.info, they don't allow anyone to fetch/crawl their data... Honestly I don't even know how they manage to aggregate it in the first place!

andrasfuchs commented 2 years ago

What if we (the users of your extension) sent the review data back to you after we fetched it on the client side? ;) In that way you could update your review cache over time on the games that are viewed within your extension.

Nebukam commented 2 years ago

That would work if I had a server to work with, I'm currently generating the cache on my local machine and then pushing https://github.com/Nebukam/steam-db from which I fetch data ^^'
This is much more barbaric & cheap than you think x)

andrasfuchs commented 2 years ago

What if you had a server with a web API? :) I could do you the server side programming and host it on a server.

If you think it would make sense, let me know and I put together something as a start to see if we could cooperate. ;)

Nebukam commented 2 years ago

Sure! That's be definitely interesting to do :)
I still have quite some work to go through before reaching that point, but I'll definitely poke you here when I get to that.

What do you have in mind as far the API goes?
Also looking at my answer above, I would still only be able to fetch data on-demand, per-game to circumvent the 429. The PWA version of the app is already using a free Glitch server in background to circumvent CORS but it's super slow to boot up, and it's not immune to 429 either.

There's also a bunch of things to account for when crawling the product page (which would be required unless we can partner up with steamdb.info, which sounds highly unlikely) :

andrasfuchs commented 2 years ago

Obviously the idea of the API is very flexible in my head at the moment, but I had the following ideas in mind:

These things above would not solve the challenges you have with the crawling/changing HTML pages on the client, but it would allow us to think about more advanced features in the future.

I'm curious if you think it's exciting enough to put in the hours, and make this happen. I know that it would take a few weeks for me to do the API, but I think the end result would be awesome :)