improve iksm login flow

This commit is contained in:
eli fessler
2022-11-18 21:41:15 -10:00
parent 06adee6add
commit a16ecd6825

12
iksm.py
View File

@@ -2,7 +2,7 @@
# https://github.com/frozenpandaman/s3s
# License: GPLv3
import base64, hashlib, json, os, re, sys
import base64, hashlib, json, os, re, sys, urllib
import requests
from bs4 import BeautifulSoup
@@ -149,14 +149,10 @@ def log_in(ver, app_user_agent):
'theme': 'login_form'
}
url = 'https://accounts.nintendo.com/connect/1.0.0/authorize'
r = session.get(url, headers=app_head, params=body)
post_login = r.history[0].url
print("\nMake sure you have fully read the \"Token generation\" section of the readme before proceeding. To manually input a token instead, enter \"skip\" at the prompt below.")
print("\nMake sure you have read the \"Token generation\" section of the readme before proceeding. To manually input your tokens instead, enter \"skip\" at the prompt below.")
print("\nNavigate to this URL in your browser:")
print(post_login)
print(f'https://accounts.nintendo.com/connect/1.0.0/authorize?{urllib.parse.urlencode(body)}')
print("Log in, right click the \"Select this account\" button, copy the link address, and paste it below:")
while True:
try: