How can I get a list of all CSGO items including skin name, quality and rarity?

前端 未结 1 1655
囚心锁ツ
囚心锁ツ 2021-02-04 19:17

I\'m not looking for details of a specific player inventory, but a list of all items for CSGO. What I want is details of the weapons in particular, but including skin name info

1条回答
  •  醉话见心
    2021-02-04 20:02

    I haven't found anything regarding skins in Steam Web Api.

    Lists of all skins as well as rarity and corresponding weapons are in "paint_kits", "paint_kits_rarity" and "item_sets" sections of /csgo/scripts/items/items_game.txt file.

    As for their correct names, those are in /csgo/resource/csgo_YOUR_LANGUAGE.txt. Looking like that

    "PaintKit_so_red_Tag"                       "Candy Apple"
    

    Won't be hard to make php or python script to get all of it and put it in a database for ease of use.

    For skins images you could get weapon and skin name from the above, and do a foreach curl loop to get content from div with "market_listing_largeimage" class using for example simple_html_dom.php, from url http://steamcommunity.com/market/listings/730/{ITEM_NAME}%20%7C%20{SKIN_NAME}%20%28{USAGE_THINGY Ex. Well-Worn}%29

    Just remember to replace all spaces going to the url with %20 but that depends on what you use to get the page. You could do a foreach on the usage thingy since some weapons don't have some variants on the market, curl could return wrong page. Nothing that a simple if+foreach couldn't fix.

    Also do it only after skins update if overused you could get blocked from valve website for spamming. You could also use SteamWebApi and game news to check for new versions and update it automatically then. Just use your imagination and google.

    0 讨论(0)
提交回复
热议问题