From 24b8c5b094600f9980a385122fca7526ac07a2e0 Mon Sep 17 00:00:00 2001 From: Rossen Georgiev Date: Sat, 10 Nov 2018 16:05:33 +0000 Subject: [PATCH] fix #154; validate_phone_number() returning no data --- steam/guard.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/steam/guard.py b/steam/guard.py index 838fa4e..6f5c95d 100644 --- a/steam/guard.py +++ b/steam/guard.py @@ -364,9 +364,13 @@ class SteamAuthenticator(object): sess = self._get_web_session() try: - resp = sess.get('https://store.steampowered.com//phone/validate', - params={'phoneNumber': phone_number}, - timeout=15).json() + resp = sess.post('https://store.steampowered.com/phone/validate', + data={ + 'phoneNumber': phone_number, + 'sessionID': sess.cookies.get('sessionid', domain='store.steampowered.com'), + }, + allow_redirects=False, + timeout=15).json() except: resp = {}