login cookie still not working
I tried reinstalling the library and/or using other users' solutions, nothing helped, however @xidios solution helped solve the problem with authorization and cookie creation after the first connection. However, when trying to authorize via cookies - I get the error Invalid steam_id: None. Honestly, tried even on macOS to test, still the same thing, although I know that it is related to the update of steam. Does anyone have a solution, how to return authorization by cookie, because every time authorize manually - a bad idea....
Fix by @xidios:
def set_sessionid_cookies(self):
community_domain = SteamUrl.COMMUNITY_URL[8:]
store_domain = SteamUrl.STORE_URL[8:]
community_cookie_dic = self.session.cookies.get_dict(domain = community_domain)
store_cookie_dic = self.session.cookies.get_dict(domain = store_domain)
for name in ('steamLoginSecure', 'sessionid', 'steamRefresh_steam', 'steamCountry'):
cookie = self.session.cookies.get_dict()[name]
if name in ["steamLoginSecure"]:
store_cookie = create_cookie(name, store_cookie_dic[name], store_domain)
else:
store_cookie = create_cookie(name, cookie, store_domain)
if name in ["sessionid", "steamLoginSecure"]:
community_cookie = create_cookie(name, community_cookie_dic[name], community_domain)
else:
community_cookie = create_cookie(name, cookie, community_domain)
self.session.cookies.set(**community_cookie)
self.session.cookies.set(**store_cookie)
Hi, I am using cookie authentication in my selenium script, I am taking these cookies client._session.cookies.get_dict("steamcommunity.com")
client is SteamClient in steampy library
Hi, I am using cookie authentication in my selenium script, I am taking these cookies
client._session.cookies.get_dict("steamcommunity.com")client is SteamClient in steampy library
Is it alright if there are only 'sessionid' and 'steamCountry'?
Hi, I am using cookie authentication in my selenium script, I am taking these cookies
client._session.cookies.get_dict("steamcommunity.com")client is SteamClient in steampy libraryIs it alright if there are only 'sessionid' and 'steamCountry'?
I have this cookie set
Hi, I am using cookie authentication in my selenium script, I am taking these cookies
client._session.cookies.get_dict("steamcommunity.com")client is SteamClient in steampy libraryIs it alright if there are only 'sessionid' and 'steamCountry'?
I have this cookie set
Hm, that's weird. I have exact fix and when I get cookies the way you do, I only have these two. Are you sure you haven't changed anything else?
I found the problem. It feels like SteamPy gives two different jsons and one overwrites another
Yes, it works now. Thank you
where i need to write?
client._session.cookies.get_dict("steamcommunity.com")
where i need to write?
client._session.cookies.get_dict("steamcommunity.com")
These are cookies you get. You can use them, for example, in set_login_cookies
Hi, I am using cookie authentication in my selenium script, I am taking these cookies
client._session.cookies.get_dict("steamcommunity.com")client is SteamClient in steampy library
OMFG, IT`S WORK NOW, THANKS
I have this cookie set