Get default user agent string from @doctormckay/user-agents

This commit is contained in:
Alex Corn 2023-10-20 00:39:38 -04:00
parent e1af63e171
commit 67867978f8
No known key found for this signature in database
GPG Key ID: E51989A3E7A27FDF
2 changed files with 4 additions and 4 deletions

View File

@ -1,10 +1,9 @@
const {chrome} = require('@doctormckay/user-agents');
const Request = require('request');
const SteamID = require('steamid');
const Helpers = require('./components/helpers.js');
const USER_AGENT = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36";
require('util').inherits(SteamCommunity, require('events').EventEmitter);
module.exports = SteamCommunity;
@ -29,7 +28,7 @@ function SteamCommunity(options) {
"timeout": options.timeout || 50000,
"gzip": true,
"headers": {
"User-Agent": options.userAgent || USER_AGENT
"User-Agent": options.userAgent || chrome()
}
};

View File

@ -28,11 +28,12 @@
"url": "https://github.com/DoctorMcKay/node-steamcommunity.git"
},
"dependencies": {
"@doctormckay/user-agents": "^1.0.0",
"async": "^2.6.3",
"cheerio": "0.22.0",
"image-size": "^0.8.2",
"request": "^2.88.0",
"steam-session": "^1.5.0",
"steam-session": "^1.6.0",
"steam-totp": "^1.5.0",
"steamid": "^1.1.3",
"xml2js": "^0.6.2"