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

自闭症网瘾萝莉.ら 提交于 2019-12-03 10:07:59

问题


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 information and rarity.

To make it easier to explain this site has the information I need, except rarity.

http://csgo.steamanalyst.com/list.php

By using the following api url I can get weapon model names but not skin names (ie. "Zirka") http://api.steampowered.com/IEconItems_730/GetSchema/v0002/?key={YOUR_API_KEY}


回答1:


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.



来源:https://stackoverflow.com/questions/27560485/how-can-i-get-a-list-of-all-csgo-items-including-skin-name-quality-and-rarity

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!