mirror of
https://github.com/ClaytonWWilson/Scraper-for-theTVDB.com.git
synced 2025-12-16 17:38:47 +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()
|
clearFolders()
|
||||||
wait()
|
wait()
|
||||||
elif choice == "3": # TODO if already logged in, ask 'are you sure?'
|
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
|
clear_screen()
|
||||||
# clearLogin()
|
|
||||||
login()
|
login()
|
||||||
wait()
|
wait()
|
||||||
# elif choice == "4": # TODO need to perform this option automatically
|
|
||||||
# clear_screen()
|
|
||||||
# refreshToken()
|
|
||||||
# wait()
|
|
||||||
elif choice == "4":
|
elif choice == "4":
|
||||||
print("install requirements not implemented yet")
|
print("install requirements not implemented yet")
|
||||||
wait()
|
wait()
|
||||||
|
|||||||
20
login.py
20
login.py
@ -27,14 +27,20 @@ def login():
|
|||||||
tmp_user_key = ""
|
tmp_user_key = ""
|
||||||
tmp_user_name = ""
|
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 "":
|
try:
|
||||||
tmp_api_key = input("Enter your api key: ")
|
while tmp_api_key is "":
|
||||||
while tmp_user_key is "":
|
tmp_api_key = input("Enter your api key: ")
|
||||||
tmp_user_key = input("Enter your user key: ")
|
while tmp_user_key is "":
|
||||||
while tmp_user_name is "":
|
tmp_user_key = input("Enter your user key: ")
|
||||||
tmp_user_name = input("Enter your username: ")
|
while tmp_user_name is "":
|
||||||
|
tmp_user_name = input("Enter your username: ")
|
||||||
|
except KeyboardInterrupt as e:
|
||||||
|
print("\n")
|
||||||
|
return
|
||||||
|
|
||||||
LOGIN_DATA = {
|
LOGIN_DATA = {
|
||||||
"apikey": tmp_api_key,
|
"apikey": tmp_api_key,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user