Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
However, I did have some thoughts on how to do this when I first posted this. I know how to get the information, I just want to get it without having to scrape html to do it.
If your actually wanting to code something like a scraper you could just perform GET requests to sites that are already up and running that have this information. I wouldn't hammer the site too much. I would just do an initial GET request parse it to strip out the participating Game Titles and stuff them into a DB or some kind of persistent object. Every week/month or so you could hit the site again and check to see if there are any different Game titles by comparing it to your previously stored Titles.
Once you have the game titles your golden because then you can move on to hitting Steam servers instead of harassing an other developers website. For instance you have the game title 'Garry's Mod' you could do something like :
var tradingCardTitle = "Garry's Mod Trading Card";
var url = "http://steamcommunity.com/market/search?q=" + tradingCardTitle;
Your going to want to encode the url so your result should look more like this
http://steamcommunity.com/market/search?q=Garry%27s%20Mod%20Trading%20Card
From the market site you can scrape each individual card and grabs its Name, Url, ItemId, etc... Often the lists are paged so your scraper will have to account for that. So you could take these results and then save them under "Garry's Mod" in a JSON object, string or whatever. I would work out a nice DB schema but that's my personal preference.
So yea fun stuff. And remember Steam will limit the amount of requests you can make so you might want to look up that threshold and plan accordingly.
Another route would be to scrape the json from public backpacks by copying Steams Web API. So a generic GET request url would look like this: http://steamcommunity.com/id/frankster/inventory/json/440
(Where 440 is the app ID for TF2). You will have to add more to the url if your looking for specific Items. Currently I don't know the values off the top of my head. It's honestly a pain but if your interested you can find more info at https://wiki.teamfortress.com/wiki/WebAPI. So even if you do write some code to use steams web API you would still need to parse the JSON and store it in some logical manner.
Yep and this is why I asked for an API route, because this is totally not the way you should be coding. Anyways Good luck! =D
https://github.com/yaneony/hexaone-npm/blob/master/examples/card-sets.js
It can be extended to what ever you want.
Sorry, here is a new link. https://github.com/yaneony/hexaone-npm/blob/master/examples/cardsets.js
You might also check all exemples here. https://github.com/yaneony/hexaone-npm/tree/master/examples
Have fun!