mirror of
https://github.com/frozenpandaman/s3s.git
synced 2026-04-26 02:02:30 -05:00
check for outdated f generation API
as nintendo servers now reject api calls from NSO version lower than 2.12.0
This commit is contained in:
parent
600a462d83
commit
a225794954
5
iksm.py
5
iksm.py
|
|
@ -5,6 +5,7 @@
|
|||
import base64, hashlib, json, os, re, sys, urllib
|
||||
import requests
|
||||
from bs4 import BeautifulSoup
|
||||
from packaging import version
|
||||
|
||||
USE_OLD_NSOAPP_VER = False # Change this to True if you're getting a "9403: Invalid token." error
|
||||
|
||||
|
|
@ -56,6 +57,10 @@ def get_nsoapp_version():
|
|||
|
||||
NSOAPP_VERSION = ver
|
||||
|
||||
if version.parse(NSOAPP_VERSION) < version.parse(NSOAPP_SUPPORTED):
|
||||
print("f generation API is outdated! check config.txt and change f_gen that supports NSO version >= 2.12.0")
|
||||
sys.exit(1)
|
||||
|
||||
return NSOAPP_VERSION
|
||||
except: # fallback to apple app store
|
||||
try:
|
||||
|
|
|
|||
2
s3s.py
2
s3s.py
|
|
@ -32,7 +32,7 @@ try:
|
|||
config_file.close()
|
||||
except (IOError, ValueError):
|
||||
print("Generating new config file.")
|
||||
CONFIG_DATA = {"api_key": "", "acc_loc": "", "gtoken": "", "bullettoken": "", "session_token": "", "f_gen": "https://nxapi-znca-api.fancy.org.uk/api/znca"}
|
||||
CONFIG_DATA = {"api_key": "", "acc_loc": "", "gtoken": "", "bullettoken": "", "session_token": "", "f_gen": "https://nxapi-znca-api.fancy.org.uk/api/znca/f"}
|
||||
config_file = open(config_path, "w")
|
||||
config_file.seek(0)
|
||||
config_file.write(json.dumps(CONFIG_DATA, indent=4, sort_keys=False, separators=(',', ': ')))
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user