node-steamcommunity icon indicating copy to clipboard operation
node-steamcommunity copied to clipboard

Fix sharedfiles scraping error when Steam returns non-English page, fix rejected request detection and improve type detection

Open 3urobeat opened this issue 2 years ago • 7 comments

Hey! I've gotten multiple bug reports that scraping the Posted date of a sharedfile can cause an error as Steam can apparently serve a non-English page as response to our request.
I didn't consider this to be a possibility and didn't encounter this issue while testing, even though my accounts are also not English but German.

I have added a &l=english query parameter to the request and added a fallback to the Posted readout, so that even if it should fail again, no error will be thrown and the Posted value remains null.

This fix has been tested and the users who reported it confirmed that the issue did not reoccur afterwards.

3urobeat avatar Jul 11 '23 08:07 3urobeat

This PR now also improves type detection because I don't want to get on your nerves with another PR.

Some Artworks can have only one breadcrumb (for some reason) so this change looks at the first breadcrumb as a backup if the second one is missing. I have also added an if check to hopefully suppress further errors and instead just leave type at null.

3urobeat avatar Jul 26 '23 11:07 3urobeat

You prob want to merge it into https://github.com/DoctorMcKay/node-steamcommunity/pull/230

Revadike avatar Sep 28 '23 11:09 Revadike

This PR improves an existing feature in version 3.x.x, so I chose master
DoctorMcKay merged my previous PRs into v4 as well, so I think this shouldn't be a problem(?)

3urobeat avatar Sep 28 '23 11:09 3urobeat

Oh okay, I didn't know you were aware that v4 was being worked on

Revadike avatar Sep 28 '23 11:09 Revadike

Yeah, targeting master is appropriate for fixes to an existing feature, until v4 is out. I'm sorry about sorta ghosting this, been pretty busy for the past while. I'll try to deal with some open stuff, including this, later today.

DoctorMcKay avatar Oct 01 '23 14:10 DoctorMcKay

Hey, sorry for bumping, but it would be cool if you could review this PR as it fixes bugs present in the master branch.
(There are also two more of my PRs still open, but they add new features and merge into v4 instead)

3urobeat avatar May 05 '24 10:05 3urobeat