SunriseM Posted April 20, 2017 Report Posted April 20, 2017 Hello. I have been trying to load my bot inventory, but it have been too slow, first i though it was my internet because its very bad but then i tried to test using the request module and it got the inventory in 1 second. I have tried loading my tf2 inventory too and it worked fine. These are the codes i used to test it: Testing the manager.getUserInventoryContents: console.time("Load Inventory"); setTimeout(function(){ log.warn("Timeout") }, 60000); manager.getUserInventoryContents("76561198355595262", 753, 6, true, function(err, inventory){ if(err) log.error(err); else { console.timeEnd("Load Inventory") } }) Output: Timeout. Inventory never loaded and this is the code with request: var url = "http://steamcommunity.com/inventory/76561198355595262/753/6?l=english"; console.time("Load Inventory") request(url, function(err, response, body){ if(!err && response.statusCode === 200){ console.log(body) console.timeEnd("Load Inventory") } }); Output: inventory and 1017ms Am i doing something wrong? Quote
Dr. McKay Posted April 20, 2017 Report Posted April 20, 2017 It takes a long time because it has to load multiple pages, since that user has over 100,000 Steam items. Your request implementation works quickly, but is only retrieving around 75 items (or maybe 2000, I'm not sure what the default is). Quote
SunriseM Posted April 20, 2017 Author Report Posted April 20, 2017 It takes a long time because it has to load multiple pages, since that user has over 100,000 Steam items. Your request implementation works quickly, but is only retrieving around 75 items (or maybe 2000, I'm not sure what the default is).Yes, just after posting this , i noticed it wasn't giving me the whole inventory and i was also using the wrong steamid. sorry and thanks for the help Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.