mirror of
https://github.com/ClaytonWWilson/Scraper-for-theTVDB.com.git
synced 2025-12-15 17:28:46 +00:00
Added CTRL+C option to cancel login
This commit is contained in:
parent
d31e4d563e
commit
954c90b63c
@ -37,14 +37,9 @@ while True:
|
||||
clearFolders()
|
||||
wait()
|
||||
elif choice == "3": # TODO if already logged in, ask 'are you sure?'
|
||||
clear_screen() # TODO wait to clear login and add a ctrl+c option to cancel
|
||||
# clearLogin()
|
||||
clear_screen()
|
||||
login()
|
||||
wait()
|
||||
# elif choice == "4": # TODO need to perform this option automatically
|
||||
# clear_screen()
|
||||
# refreshToken()
|
||||
# wait()
|
||||
elif choice == "4":
|
||||
print("install requirements not implemented yet")
|
||||
wait()
|
||||
|
||||
20
login.py
20
login.py
@ -27,14 +27,20 @@ def login():
|
||||
tmp_user_key = ""
|
||||
tmp_user_name = ""
|
||||
|
||||
print("You can find your user key & request an API key while logged in at:\nhttps://www.thetvdb.com/?tab=userinfo\n")
|
||||
print("You can find your user key & request an API key while logged in at:\n"
|
||||
"https://www.thetvdb.com/?tab=userinfo\n"
|
||||
"Press CTRL+C to cancel.\n")
|
||||
|
||||
while tmp_api_key is "":
|
||||
tmp_api_key = input("Enter your api key: ")
|
||||
while tmp_user_key is "":
|
||||
tmp_user_key = input("Enter your user key: ")
|
||||
while tmp_user_name is "":
|
||||
tmp_user_name = input("Enter your username: ")
|
||||
try:
|
||||
while tmp_api_key is "":
|
||||
tmp_api_key = input("Enter your api key: ")
|
||||
while tmp_user_key is "":
|
||||
tmp_user_key = input("Enter your user key: ")
|
||||
while tmp_user_name is "":
|
||||
tmp_user_name = input("Enter your username: ")
|
||||
except KeyboardInterrupt as e:
|
||||
print("\n")
|
||||
return
|
||||
|
||||
LOGIN_DATA = {
|
||||
"apikey": tmp_api_key,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user