Jump to content
McKay Development

Recommended Posts

Posted

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? 

Posted

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).

Posted

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

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...