mirror of
https://github.com/frozenpandaman/s3s.git
synced 2026-07-21 09:50:24 -05:00
allow easy toggling of old NSO app version headers (#113)
This commit is contained in:
parent
d61b0eddd2
commit
5cae35459c
7
iksm.py
7
iksm.py
|
|
@ -6,6 +6,8 @@ import base64, hashlib, json, os, re, sys, urllib
|
|||
import requests
|
||||
from bs4 import BeautifulSoup
|
||||
|
||||
USE_OLD_NSOAPP_VER = True # Change this to True if you're getting a "9403: Invalid token." error
|
||||
|
||||
S3S_VERSION = "unknown"
|
||||
NSOAPP_VERSION = "unknown"
|
||||
NSOAPP_VER_FALLBACK = "2.4.0"
|
||||
|
|
@ -26,6 +28,9 @@ session = requests.Session()
|
|||
def get_nsoapp_version():
|
||||
'''Fetches the current Nintendo Switch Online app version from the Apple App Store and sets it globally.'''
|
||||
|
||||
if USE_OLD_NSOAPP_VER:
|
||||
return NSOAPP_VER_FALLBACK
|
||||
|
||||
global NSOAPP_VERSION
|
||||
if NSOAPP_VERSION != "unknown": # already set
|
||||
return NSOAPP_VERSION
|
||||
|
|
@ -308,7 +313,7 @@ def get_gtoken(f_gen_url, session_token, ver):
|
|||
except:
|
||||
print("Error from Nintendo (in Account/Login step):")
|
||||
print(json.dumps(splatoon_token, indent=2))
|
||||
print("Re-running the script usually fixes this.")
|
||||
print("Try re-running the script. Or, if the NSO app has recently been updated, you may temporarily change `USE_OLD_NSOAPP_VER` to True at the top of iksm.py for a workaround.")
|
||||
sys.exit(1)
|
||||
|
||||
f, uuid, timestamp = call_f_api(id_token, 2, f_gen_url)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user