diff --git a/steam/client/builtins/web.py b/steam/client/builtins/web.py index a9c5d90..97e6692 100644 --- a/steam/client/builtins/web.py +++ b/steam/client/builtins/web.py @@ -2,7 +2,7 @@ Web related features """ from binascii import hexlify -from steam import WebAPI +from steam import webapi from steam.core.crypto import generate_session_key, symmetric_encrypt, sha1_hash, random_bytes from steam.util.web import make_requests_session @@ -32,8 +32,7 @@ class Web(object): } try: - api = WebAPI(None) - resp = api.ISteamUserAuth.AuthenticateUser(**data) + resp = webapi.post('ISteamUserAuth', 'AuthenticateUser', 1, params=data) except Exception as exp: self._logger.debug("get_web_session_cookies error: %s" % str(exp)) return None diff --git a/steam/core/cm.py b/steam/core/cm.py index 8db9ee2..5d11df8 100644 --- a/steam/core/cm.py +++ b/steam/core/cm.py @@ -347,7 +347,7 @@ class CMClient(EventEmitter): self.steam_id = SteamID(msg.header.steamid) self.session_id = msg.header.client_sessionid - self.webapi_authenticate_user_nonce = msg.body.webapi_authenticate_user_nonce + self.webapi_authenticate_user_nonce = msg.body.webapi_authenticate_user_nonce.encode('ascii') if self._heartbeat_loop: self._heartbeat_loop.kill() @@ -431,11 +431,10 @@ class CMServerList(object): :return: booststrap success :rtype: :class:`bool` """ - from steam import WebAPI + from steam import _webapi try: - api = WebAPI(None) - resp = api.ISteamDirectory.GetCMList_v1(cellid=cellid) + resp = _webapi.get('ISteamDirectory', 'GetCMList', 1, params={'cellid': cellid}) except Exception as exp: self._log.error("WebAPI boostrap failed: %s" % str(exp)) return False