Merge branch 'master' into feature-get-friends-list

This commit is contained in:
Alex Corn
2021-07-22 03:03:24 -04:00
committed by GitHub
6 changed files with 133 additions and 6 deletions

View File

@@ -304,8 +304,8 @@ SteamCommunity.prototype.setCookies = function(cookies) {
});
};
SteamCommunity.prototype.getSessionID = function() {
var cookies = this._jar.getCookieString("http://steamcommunity.com").split(';');
SteamCommunity.prototype.getSessionID = function(host = "http://steamcommunity.com") {
var cookies = this._jar.getCookieString(host).split(';');
for(var i = 0; i < cookies.length; i++) {
var match = cookies[i].trim().match(/([^=]+)=(.+)/);
if(match[1] == 'sessionid') {