Steam market fail authorization
lobzenko opened this issue · 11 comments
Hello, accept-trade-offers.js works fine few last months, but now:
2014-09-25T03:30:42.361Z - info: offerCmd stdout: [debug] [phantom] Navigation requested: url=https://steamcommunity.com/market/eligibili
tycheck/?goto=/market/, type=Other, willNavigate=true, isMainFrame=true
2014-09-25T03:30:42.947Z - info: offerCmd stdout: [debug] [phantom] Navigation requested: url=http://steamcommunity.com/market/, type=Oth
er, willNavigate=true, isMainFrame=true
2014-09-25T03:30:43.291Z - info: offerCmd stdout: [debug] [phantom] Navigation requested: url=https://steamcommunity.com/market/eligibili
tycheck/?goto=/market/, type=Other, willNavigate=true, isMainFrame=true
2014-09-25T03:30:43.867Z - info: offerCmd stdout: [debug] [phantom] Navigation requested: url=http://steamcommunity.com/market/, type=Oth
er, willNavigate=true, isMainFrame=true
2014-09-25T03:30:44.206Z - info: offerCmd stdout: [debug] [phantom] Navigation requested: url=https://steamcommunity.com/market/eligibili
tycheck/?goto=/market/, type=Other, willNavigate=true, isMainFrame=true
2014-09-25T03:30:44.766Z - info: offerCmd stdout: [debug] [phantom] Navigation requested: url=http://steamcommunity.com/market/, type=Oth
er, willNavigate=true, isMainFrame=true
2014-09-25T03:30:45.105Z - info: offerCmd stdout: [debug] [phantom] Navigation requested: url=https://steamcommunity.com/market/eligibili
tycheck/?goto=/market/, type=Other, willNavigate=true, isMainFrame=true
2014-09-25T03:30:45.698Z - info: offerCmd stdout: [warning] [phantom] Loading resource failed with status=fail (HTTP 302): https://steamc
ommunity.com/market/eligibilitycheck/?goto=/market/
and user not authorizate with cookies from file.
That's not good, it's probably because of all the changes to Steam lately. I'll take a look when I can.
I think so, while i try change authorization for own gifts buying script. Waiting your fix )
Also, that i see when try get http page from PHP script with cookie use CURL
Notice: return first url to "http://steamcommunity.com/" screenshot show im login, but when try get
http://steamcommunity.com/id/[id]/tradeoffers/ repeat switching with https://steamcommunity.com/market/eligibilitycheck/
ok, im write all cookies from steam webform use phantom autgorization, and its works.
I think now only sessionid not enough.
Also recommend keep cookies in file JSON
var cookieFile = 'cookies-steam-market';
var cookieStr = fs.read(cookieFile);
var cookies = JSON.parse(cookieStr);
phantom.clearCookies();
for(var k in cookies) {
phantom.addCookie({
'name': cookies[k]['name'],
'value': cookies[k]['value'],
'domain': cookies[k]['domain'],
'httponly': cookies[k]['domain'],
'secure': cookies[k]['secure'],
'expires': (new Date()).getTime() + (1000 * 60 * 60)
});
}
BTW the url sets this cookie:
webTradeEligibility={
"allowed":1,
"allowed_at_time":0,
"steamguard_required_days":15,
"sales_this_year":1968,
"max_sales_per_year":-1,
"forms_requested":0,
"new_device_cooldown_days":7
}; path=/; httponly
Great thanks, should be able to get this fixed on the weekend.
I think this is a reason:
var cookieDetails = cookies[i].split("=");
its not work for this example: "sessionid=NTgxODk3NDA=;"
That should be encoded though like
recentlyVisitedAppHubs=440%2C107410%2C730; sessionid=MTgXXXXODcwMA%3D%3D; Steam_Language=english;
Looks like this is fixed with the latest version of node-steam and node-steam-trade. Updating those packages should make it work again.
Make sure you use 'npm install --latest' since it's a minor version update on node-steam.