mirror of
https://github.com/DoctorMcKay/node-steamcommunity.git
synced 2025-03-14 15:00:07 +08:00
Get default user agent string from @doctormckay/user-agents
This commit is contained in:
parent
e1af63e171
commit
67867978f8
5
index.js
5
index.js
@ -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()
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user