4049_1572836826 Posted March 25 Report Share Posted March 25 Hi, in the future I plan to have more bots in one script they will have functions that will get info from steam pages and I would like to avoid limits. I have made such a solution which works with request.. And I would like to ask if there is another option ? proxy.bot = 'http://xx:[email protected]:xxx' steamUser.bot = new SteamUser({ httpProxy: proxy.bot }) request.bot = Request.defaults({ forever: true, proxy: proxy.bot }) steamCommunity.bot = new Steamcommunity({ request: request.bot }) steamUser.bot.logOn({ refreshToken: 'xxx' }) steamUser.bot.on('loggedOn', () => { console.log('Logged on!') console.log(steamUser.bot.publicIP) // * to eq proxy IP }) steamUser.bot.on('webSession', (sessionID, cookies) => { steamCommunity.bot.setCookies(cookies) steamCommunity.bot.loggedIn((err, loggedIn) => { if (err) console.log(err) if (loggedIn) console.log('Logged in!') const { request: SCrequest } = steamCommunity.bot SCrequest.get('https://api.ipify.org?format=json', (err, res, body) => { if (err) console.log(err) console.log(JSON.parse(body).ip) // * to eq proxy IP }) SCrequest.get('https://steamcommunity.com/my/profile', (err, res) => { if (err) console.log(err) console.log(res.request.uri.href) // * return /profiles/steamID }) }) }) Quote Link to comment Share on other sites More sharing options...
Dr. McKay Posted March 25 Report Share Posted March 25 That looks fine to me. Quote Link to comment Share on other sites More sharing options...
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.