diff --git a/components/http.js b/components/http.js index 30593bd..ebb1846 100644 --- a/components/http.js +++ b/components/http.js @@ -98,7 +98,7 @@ SteamCommunity.prototype._checkHttpError = function(err, response, callback, bod return err; } - if (response.statusCode == 403 && response.body && response.body.match(/
Enter your PIN below to exit Family View.<\/div>/)) { + if (response.statusCode == 403 && typeof response.body === 'string' && response.body.match(/
Enter your PIN below to exit Family View.<\/div>/)) { err = new Error("Family View Restricted"); callback(err, response, body); return err; diff --git a/index.js b/index.js index 9077823..46a19b3 100644 --- a/index.js +++ b/index.js @@ -3,7 +3,7 @@ var RSA = require('node-bignumber').Key; var hex2b64 = require('node-bignumber').hex2b64; var SteamID = require('steamid'); -const USER_AGENT = "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36"; +const USER_AGENT = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36"; require('util').inherits(SteamCommunity, require('events').EventEmitter); @@ -45,7 +45,7 @@ function SteamCommunity(options) { defaults.localAddress = options.localAddress; } - this.request = options.request || Request.defaults(); + this.request = options.request || Request.defaults({"forever": true}); // "forever" indicates that we want a keep-alive agent this.request = this.request.defaults(defaults); // English diff --git a/package.json b/package.json index de07d9d..5ec5379 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "steamcommunity", - "version": "3.30.4", + "version": "3.30.6", "description": "Provides an interface for logging into and interacting with the Steam Community website", "keywords": ["steam", "steam community"], "homepage": "https://github.com/DoctorMcKay/node-steamcommunity",