From e9c4d2360c9c58fde9530e09c53bac660280d2fc 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 cbcfbb0..5fe77f5 100644 --- a/steam/guard.py +++ b/steam/guard.py @@ -367,9 +367,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 = {}