mirror of
https://github.com/ClaytonWWilson/Scraper-for-theTVDB.com.git
synced 2025-12-15 17:28:46 +00:00
Refactoring - Small code fixes.
This commit is contained in:
parent
7298c82ceb
commit
2edfc5be14
@ -37,7 +37,7 @@ def login():
|
||||
tmp_user_key = input("Enter your Unique ID: ")
|
||||
while tmp_api_key is "":
|
||||
tmp_api_key = input("Enter your API Key: ")
|
||||
except KeyboardInterrupt as e:
|
||||
except KeyboardInterrupt:
|
||||
print("\n")
|
||||
return
|
||||
|
||||
@ -121,7 +121,7 @@ def refreshToken():
|
||||
obj.write(json.dumps(login))
|
||||
obj.close()
|
||||
print("New token acquired!\n")
|
||||
except Exception as e:
|
||||
except Exception:
|
||||
print("You need to log in first. Select Login/Change login.\n") # TODO make a set of constants for error codes
|
||||
else:
|
||||
print("You need to log in first. Select Login/Change login.\n")
|
||||
|
||||
@ -39,11 +39,6 @@ def search():
|
||||
print("There was an error checking your login. Try logging in again with 'Login/Change login'.")
|
||||
return None
|
||||
|
||||
# All login checks pass and search starts
|
||||
FAN_KEY_TYPE = "?keyType=fanart" # These are used in the search strings
|
||||
POS_KEY_TYPE = "?keyType=poster"
|
||||
BAN_KEY_TYPE = "?keyType=series"
|
||||
|
||||
authHeaders = {
|
||||
"Content-Type": "application/json",
|
||||
"Accept": "application/json",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user