From a16ecd6825ee94f771032bf23e11da5f16624f3a Mon Sep 17 00:00:00 2001 From: eli fessler Date: Fri, 18 Nov 2022 21:41:15 -1000 Subject: [PATCH] improve iksm login flow --- iksm.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/iksm.py b/iksm.py index 864937a..cd599fd 100644 --- a/iksm.py +++ b/iksm.py @@ -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: