mirror of
https://github.com/DoctorMcKay/node-steamcommunity.git
synced 2026-08-23 23:23:29 +08:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
26effb27fe | ||
|
|
5880e922ab | ||
|
|
fe007811a5 | ||
|
|
7b882c8439 |
15
README.md
15
README.md
@@ -9,12 +9,15 @@ This module provides an easy interface for the Steam Community website. This mod
|
||||
|
||||
It supports Steam Guard and CAPTCHAs.
|
||||
|
||||
# Installation
|
||||
|
||||
Install it from npm:
|
||||
|
||||
$ npm install steamcommunity
|
||||
**Have a question about the module or coding in general? *Do not create a GitHub issue.* GitHub issues are for feature
|
||||
requests and bug reports. Instead, post in the [dedicated forum](https://dev.doctormckay.com/forum/8-node-steamcommunity/).
|
||||
Such issues may be ignored!**
|
||||
|
||||
# Documentation
|
||||
|
||||
As of version 1.0.0, documentation is on the [GitHub wiki](https://github.com/DoctorMcKay/node-steamcommunity/wiki).
|
||||
Documentation is available on the [GitHub wiki](https://github.com/DoctorMcKay/node-steamcommunity/wiki).
|
||||
|
||||
# Support
|
||||
|
||||
Report bugs on the [issue tracker](https://github.com/DoctorMcKay/node-steamcommunity/issues) or ask questions
|
||||
on the [dedicated forum](https://dev.doctormckay.com/forum/8-node-steamcommunity/).
|
||||
|
||||
@@ -105,14 +105,14 @@ SteamCommunity.prototype._checkHttpError = function(err, response, callback) {
|
||||
SteamCommunity.prototype._checkCommunityError = function(html, callback) {
|
||||
var err;
|
||||
|
||||
if(html && html.match(/<h1>Sorry!<\/h1>/)) {
|
||||
if(typeof html === 'string' && html.match(/<h1>Sorry!<\/h1>/)) {
|
||||
var match = html.match(/<h3>(.+)<\/h3>/);
|
||||
err = new Error(match ? match[1] : "Unknown error occurred");
|
||||
callback(err);
|
||||
return err;
|
||||
}
|
||||
|
||||
if (html && html.match(/g_steamID = false;/) && html.match(/<h1>Sign In<\/h1>/)) {
|
||||
if (typeof html === 'string' && html.match(/g_steamID = false;/) && html.match(/<h1>Sign In<\/h1>/)) {
|
||||
err = new Error("Not Logged In");
|
||||
callback(err);
|
||||
this._notifySessionExpired(err);
|
||||
@@ -123,7 +123,7 @@ SteamCommunity.prototype._checkCommunityError = function(html, callback) {
|
||||
};
|
||||
|
||||
SteamCommunity.prototype._checkTradeError = function(html, callback) {
|
||||
if (!html) {
|
||||
if (typeof html !== 'string') {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "steamcommunity",
|
||||
"version": "3.19.1",
|
||||
"version": "3.19.2",
|
||||
"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",
|
||||
@@ -17,7 +17,7 @@
|
||||
"node-bignumber": "^1.2.1",
|
||||
"steamid": "^0.3.1",
|
||||
"xml2js": "^0.4.11",
|
||||
"cheerio": "^0.19.0",
|
||||
"cheerio": "^0.20.0",
|
||||
"async": "^1.4.2",
|
||||
"steam-totp": "^1.3.0"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user