csfloat / inspect

Source Code that Powers the CSFloat Inspect Link API
https://csgofloat.com
MIT License
403 stars 119 forks source link

Serialized inspect links are failing with Bad Request #229

Closed gaelsuv closed 1 day ago

gaelsuv commented 2 days ago

I'm trying to inspect serialized inspect links like the following (this is a charm, but I'm guessing this is not the relevant point here): steam://rungame/730/76561202255233023/+csgo_econ_action_preview%200018CB0A28033000A201080800100A50CBA80153B39EB8

The API is returning a 400 Bad Request error when invoked with the "url" parameter since A, D, S/M skin parameters are not parsable. What am I missing? Do I need to deserialize somehow the inspect links to make them work with the standard parsing rule? Since some of those links are being returned by the CSFloat https://docs.csfloat.com/#listings API, are those links supposed to work or are they being obfuscated on purpose?

wangxingzhen commented 2 days ago

We use the A, D, and S/M parameters to query the Game Coordinator (GC) and retrieve data. However, your inspect link can be directly deserialized to obtain the necessary information. If you deserialize the link, you'll get the relevant data structure without needing to go through the GC. You can refer to the method for generating your type of inspect link in this code: https://github.com/dr3fty/cs2-inspect-gen/blob/master/convert-gen.py#L8 By examining this code, you can reverse-engineer the process to obtain data using your inspect link.

Step7750 commented 1 day ago

There is no reason to use an inspect server if you have serialized links.

Those links are obfuscated at times to preserve the seller's identity -- you can parse them yourself (or you really don't need to since other parts of the JSON are a super-set).