Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

client_id #409

Open
Aarab228 opened this issue Nov 1, 2024 · 0 comments
Open

client_id #409

Aarab228 opened this issue Nov 1, 2024 · 0 comments

Comments

@Aarab228
Copy link

Aarab228 commented Nov 1, 2024

20:45:40 DEBUG | [Unknown] | Starting new HTTPS connection (1): steamcommunity.com:443
20:45:40 DEBUG | [Unknown] | https://steamcommunity.com:443 "POST / HTTP/1.1" 200 8588
20:45:40 DEBUG | [Unknown] | Starting new HTTPS connection (1): api.steampowered.com:443
20:45:41 DEBUG | [Unknown] | https://api.steampowered.com:443 "GET /IAuthenticationService/GetPasswordRSAPublicKey/v1?account_name=******** HTTP/1.1" 200 597
20:45:41 DEBUG | [Unknown] | https://api.steampowered.com:443 "POST /IAuthenticationService/BeginAuthSessionViaCredentials/v1 HTTP/1.1" 200 55
20:45:41 ERROR | [create_cookies] | Error: 'client_id'

`
def login(self, username: str = None, password: str = None, steam_guard: str = None) -> None:
invalid_client_credentials_is_present = None in (self.username, self._password, self.steam_guard_string)
invalid_login_credentials_is_present = None in (username, password, steam_guard)

    if invalid_client_credentials_is_present and invalid_login_credentials_is_present:
        raise InvalidCredentials(
            'You have to pass username, password and steam_guard parameters when using "login" method'
        )

    if invalid_client_credentials_is_present:
        self.steam_guard_string = steam_guard
        self.steam_guard = guard.load_steam_guard(self.steam_guard_string)
        self.username = username
        self._password = password

    if self.was_login_executed and self.is_session_alive():
        return  # Session is alive, no need to login again

    self._session.cookies.set('steamRememberLogin', 'true')
    LoginExecutor(self.username, self._password, self.steam_guard['shared_secret'], self._session).login()
    self.was_login_executed = True
    self.market._set_login_executed(self.steam_guard, self._get_session_id())`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant