steamcommunity 3.48.0 → 3.48.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +9 -5
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -154,16 +154,20 @@ SteamCommunity.prototype._setCookie = function(cookie, secure) {
|
|
|
154
154
|
var protocol = secure ? "https" : "http";
|
|
155
155
|
cookie.secure = !!secure;
|
|
156
156
|
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
157
|
+
if (cookie.domain) {
|
|
158
|
+
this._jar.setCookie(cookie.clone(), protocol + '://' + cookie.domain);
|
|
159
|
+
} else {
|
|
160
|
+
this._jar.setCookie(cookie.clone(), protocol + "://steamcommunity.com");
|
|
161
|
+
this._jar.setCookie(cookie.clone(), protocol + "://store.steampowered.com");
|
|
162
|
+
this._jar.setCookie(cookie.clone(), protocol + "://help.steampowered.com");
|
|
163
|
+
}
|
|
160
164
|
};
|
|
161
165
|
|
|
162
166
|
SteamCommunity.prototype.setCookies = function(cookies) {
|
|
163
167
|
cookies.forEach((cookie) => {
|
|
164
|
-
var cookieName = cookie.
|
|
168
|
+
var cookieName = cookie.trim().split('=')[0];
|
|
165
169
|
if (cookieName == 'steamLogin' || cookieName == 'steamLoginSecure') {
|
|
166
|
-
this.steamID = new SteamID(cookie.match(
|
|
170
|
+
this.steamID = new SteamID(cookie.match(/steamLogin(Secure)?=(\d+)/)[2]);
|
|
167
171
|
}
|
|
168
172
|
|
|
169
173
|
this._setCookie(Request.cookie(cookie), !!(cookieName.match(/^steamMachineAuth/) || cookieName.match(/Secure$/)));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "steamcommunity",
|
|
3
|
-
"version": "3.48.
|
|
3
|
+
"version": "3.48.2",
|
|
4
4
|
"description": "Provides an interface for logging into and interacting with the Steam Community website",
|
|
5
5
|
"files": [
|
|
6
6
|
"/classes",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"cheerio": "0.22.0",
|
|
34
34
|
"image-size": "^0.8.2",
|
|
35
35
|
"request": "^2.88.0",
|
|
36
|
-
"steam-session": "^1.
|
|
36
|
+
"steam-session": "^1.7.2",
|
|
37
37
|
"steam-totp": "^1.5.0",
|
|
38
38
|
"steamid": "^1.1.3",
|
|
39
39
|
"xml2js": "^0.6.2"
|