Answer the question
In order to leave comments, you need to log in
How to determine the number of identical items in the steam inverter?
Through a request like steamcommunity.com/profiles/steamID/inventory/json... I get what items are in this inverter, but if there are several identical items (for example, cases), the result of the request will not change. The above question follows from this. How to determine the number of identical items in the steam inverter?
Answer the question
In order to leave comments, you need to log in
Hmm. In general, having dug into the data that I have from this request, I found that everything is not so simple there, and yet you can pull out data on the number of items from there without resorting to new requests. First, we parse the "rgDescriptions" array on the page. From there we get the classid, market_hash_name and if you need icon_url (I think you need it). Having obtained this data, we found out what items are in the inverter, but we do not know how many identical items we have (for example, you can have 100 identical cases, but here you will not find that you have 100 of them). Therefore, we start parsing the "rgInventory" array (taken from the same page), and look for how many times each classid is repeated. This number is for each classid and will tell you how many items (having the given classid) are in the given inverter
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question