mirror of
https://github.com/frozenpandaman/s3s.git
synced 2026-08-22 02:14:30 -05:00
handle error during splatnet maintenance & still generate gtoken
This commit is contained in:
4
iksm.py
4
iksm.py
@@ -395,8 +395,8 @@ def get_bullet(web_service_token, app_user_agent, user_lang, user_country):
|
||||
bullet_token = bullet_resp["bulletToken"]
|
||||
except (json.decoder.JSONDecodeError, TypeError):
|
||||
print("Got non-JSON response from Nintendo (in api/bullet_tokens step):")
|
||||
print(bullet_resp)
|
||||
sys.exit(1)
|
||||
print(r.text)
|
||||
bullet_token = ""
|
||||
except:
|
||||
print("Error from Nintendo (in api/bullet_tokens step):")
|
||||
print(json.dumps(bullet_resp, indent=2))
|
||||
|
||||
6
s3s.py
6
s3s.py
@@ -170,7 +170,7 @@ def gen_new_tokens(reason, force=False):
|
||||
print("Attempting to generate new gtoken and bulletToken...")
|
||||
new_gtoken, acc_name, acc_lang, acc_country = iksm.get_gtoken(F_GEN_URL, SESSION_TOKEN, A_VERSION)
|
||||
new_bullettoken = iksm.get_bullet(new_gtoken, APP_USER_AGENT, acc_lang, acc_country)
|
||||
CONFIG_DATA["gtoken"] = new_gtoken # valid for 2 hours
|
||||
CONFIG_DATA["gtoken"] = new_gtoken # valid for 6 hours
|
||||
CONFIG_DATA["bullettoken"] = new_bullettoken # valid for 2 hours
|
||||
|
||||
global USER_LANG
|
||||
@@ -180,6 +180,10 @@ def gen_new_tokens(reason, force=False):
|
||||
|
||||
write_config(CONFIG_DATA)
|
||||
|
||||
if new_bullettoken == "":
|
||||
print("Wrote gtoken to config.txt, but could not generate bulletToken.")
|
||||
print("Is SplatNet 3 undergoing maintenance?")
|
||||
sys.exit(1)
|
||||
if manual_entry:
|
||||
print("Wrote tokens to config.txt.\n") # and updates acc_country if necessary...
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user