Jump to content
McKay Development

What Comes Around

Member
  • Posts

    57
  • Joined

  • Last visited

Recent Profile Visitors

604 profile views

What Comes Around's Achievements

  1. Good news, works like a charm! Scraping data just fine now! Oh and it makes sense to me now. I looked through steam community at the constructor options and I didn't see any httpProxy options. Now I see there is a request option, but instead I pass in my own request default settings and that gets replaced by my passed in option. Do I understand this correctly?
  2. Yeah I have tried using wireshark before, but my networking knowledge is very lacking. I think the easiest way to get around this problem for me is to just use VM's that use proxies. Only issue with that is if I want information to converge, I will need to setup a webserver to manage the bots. That's not a big deal because I know how to code websites but I'm just wondering what would take more time, learning and finding the problem or making vm's and a webserver to converge the data. Issue is the longer it takes the more money I lose, so I think I will go with the easier option first, to patch things up, and then look into finding the problem with requests not going through a proxy. Just a side note; could it be possible that using community.httpRequestPost outside of it's constructor mean it doesn't inherit proxy settings? Because as far as I can tell, all of my bots are logging in from separate ip's (looking at the log in history on steam). And what's being rate limited in specific is getting item data from steam community, which I made my own function for using community.httpRequestPost. By the way, I'd like to mention, I am self taught in coding, because of this I only learned what I wanted/needed, so I'm sorry if I don't explain things very clearly or have naïve ideas.
  3. I am still getting rate limited, do you perhaps know any tools to perhaps bind http requests to so I can see which functions are making requests without going through a proxy?
  4. And is the same thing necessary for TradeOfferManager or does it inherit the proxy from client and community?
  5. Good day, I have bots that are scraping the CSGO market for new items and their prices. I have around 42 bot accounts doing this, every 5 bots have their own proxy ip. I assign the ip to the steam client. However, my actual ip is getting rate limited even though I don't use it much, so I guess the requests are going through the proxy. Here is the code with which I assign a proxy: let Client = { client: new SteamUser({ httpProxy: proxy, webCompatibilityMode: true }), community: new SteamCommunity(), manager: new TradeOfferManager({ steam: this.client, community: this.community, language: 'en' }) } Am I not using this correctly? How can I narrow down the issue? I am 100% sure it's because of my bots running, because when I turn them off and wait for a little while, my ip is no longer rate limited.
  6. Is there a way to get all the items on the steam market for CSGO? I have tried omitting query string and using '' (so nothing), but got back some error. I think it was there are no items with that keyword or something.
  7. Thanks! I appreciate the help Edit: I got everything figured out
  8. Good day, I have been trying to make a function that searches for a random item on the steam market, I ran into an issue. Here is the error: C:\Users\Ernest\Desktop\SteamBot\Current Version\node_modules\steamcommunity\classes\CMarketSearchResult.js:62 callback(new Error($errorMsg.text())); ^ TypeError: callback is not a function at SteamCommunity.<anonymous> (C:\Users\Ernest\Desktop\SteamBot\Current Version\node_modules\steamcommunity\classes\CMarketSearchResult.js:62:5) at Request._callback (C:\Users\Ernest\Desktop\SteamBot\Current Version\node_modules\steamcommunity\components\http.js:67:15) at Request.self.callback (C:\Users\Ernest\Desktop\SteamBot\Current Version\node_modules\request\request.js:185:22) at Request.emit (events.js:315:20) at Request.<anonymous> (C:\Users\Ernest\Desktop\SteamBot\Current Version\node_modules\request\request.js:1154:10) at Request.emit (events.js:315:20) at Gunzip.<anonymous> (C:\Users\Ernest\Desktop\SteamBot\Current Version\node_modules\request\request.js:1076:12) at Object.onceWrapper (events.js:421:28) at Gunzip.emit (events.js:315:20) at endReadableNT (internal/streams/readable.js:1327:12) C:\Users\Ernest\Desktop\SteamBot\Current Version>pause Press any key to continue . . . Looking at the code here is what I see: function performSearch() { self.httpRequest({ "uri": "https://steamcommunity.com/market/search/render/", "qs": qs, "headers": { "referer": "https://steamcommunity.com/market/search" }, "json": true }, function(err, response, body) { if (err) { callback(err); return; } if(!body.success) { callback(new Error("Success is not true")); return; } if(!body.results_html) { callback(new Error("No results_html in response")); return; } var $ = Cheerio.load(body.results_html); var $errorMsg = $('.market_listing_table_message'); if($errorMsg.length > 0) { callback(new Error($errorMsg.text())); return; } var rows = $('.market_listing_row_link'); for(var i = 0; i < rows.length; i++) { results.push(new CMarketSearchResult($(rows))); } if(body.start + body.pagesize >= body.total_count) { callback(null, results); } else { qs.start += body.pagesize; performSearch(); } }, "steamcommunity"); } }; Here is my code: community.marketSearch(query, 730, false, function(err, items) { if (err) { console.log(err) } else { console.log(items) resolve(items); } }) }) I don't think there is anything wrong with my code, any ideas?
  9. Good news, well I mean the error still occurs but I know what's going on. And knowing is good . As you can see, while the error did look scary being displayed 5-10 times, all accounts do get successful requests from time to time. In fact, more often than not. So the fear factor was just a result of the scale I'm working in. I am not sure why this is the error I get instead of 502, but whatever, it's not catastrophic. Problem solved.
  10. I have looked at several ways I thought I could prevent this error, but I am still getting it. I cannot understand why it is happening. I have even made the client weblog() when the error occurs more than 10 times in succession. Still doesn't fix it. Do you know what this error could be? Because I cannot understand what the cause is.
  11. Oh I see, what happens in that case? Is there a similar property I could use for steamcommunity?
  12. Yes, I have a listener for the event and I check the steamID property. So the sessionExpired event gets handled, I don't understand why I am getting the error in that case. Here is my listener: community.on('sessionExpired', () => { information.steam_webservice_connection = 'disconnected'; log.info('LoginClient', `${user.username}'s websession expired!`) if (client.steamID == null) { log.info('LoginClient', `${user.username} was disconnected from steam! Relogging in.`) } else { client.webLogOn(); } }) So in this way if the websession is expired I log in again, otherwise it does nothing because I have relogging in enabled as default. Also I have a bit of code that checks the steam community steamID and steam client steamID to check if the user is connected: if (SteamClients[user].client.steamID == null || SteamClients[user].community.steamID == null) { connection = '\x1b[31mdisconnected\x1b[37m' } else { connection = '\x1b[32mconnected\x1b[37m' } and so far it seems the clients and webclients are always connected, unless steam is down. And keep in mind, as I am seeing all accounts connected, I am getting this error. So I thought it must be a cookies issue, that's why manager doesn't have access to the inventory, but then I have this listener: client.on('webSession', (sid, cookies) => { information.steam_webservice_connection = 'connected'; manager.setCookies(cookies); community.setCookies(cookies); hasWebSession = true; log.debug('LoginClient', `Client weblogged in ${user.username}`) if(isLoggedOn) { stratup = true; information.start_time = Date.now(); resolve() }; }) So if the client makes a new session (and it negotiates a websession) this event should fire. And if a new websession is established from the session expiration listener, this should fire. So, in any case manager's cookies should be up to date. So I really don't understand why I am getting this error. One more thing I should probably mention is these are my options for the manager constructor: manager: new TradeOfferManager({ steam: this.client, community: this.community, language: 'en' }) Would this perhaps need to be updated if a new client session/websession is established? I don't see why it should as the client and community constructors don't change, their sessions do but not the constructor themselves. But I just thought I should throw this out there.
×
×
  • Create New...