remove trailing spaces
This commit is contained in:
parent
4a5658791c
commit
10b400a677
1 changed files with 14 additions and 14 deletions
|
|
@ -138,20 +138,20 @@ class Display:
|
||||||
|
|
||||||
def intro(self):
|
def intro(self):
|
||||||
output = self.SH_YELLOW + ("""
|
output = self.SH_YELLOW + ("""
|
||||||
____ ___ _
|
____ ___ _
|
||||||
/ __/__ _/ _/__ _____(_)
|
/ __/__ _/ _/__ _____(_)
|
||||||
_\ \/ _ `/ _/ _ `/ __/ /
|
_\ \/ _ `/ _/ _ `/ __/ /
|
||||||
/___/\_,_/_/ \_,_/_/ /_/
|
/___/\_,_/_/ \_,_/_/ /_/
|
||||||
/ _ )___ ___ / /__ ___
|
/ _ )___ ___ / /__ ___
|
||||||
/ _ / _ \/ _ \/ '_/(_-<
|
/ _ / _ \/ _ \/ '_/(_-<
|
||||||
/____/\___/\___/_/\_\/___/
|
/____/\___/\___/_/\_\/___/
|
||||||
""" if random() > 0.5 else """
|
""" if random() > 0.5 else """
|
||||||
██████╗ ██████╗ ██╗ ██╗ ██╗██████╗
|
██████╗ ██████╗ ██╗ ██╗ ██╗██████╗
|
||||||
██╔═══██╗ ██╔══██╗██║ ╚██╗ ██╔╝╚════██╗
|
██╔═══██╗ ██╔══██╗██║ ╚██╗ ██╔╝╚════██╗
|
||||||
██║ ██║ ██████╔╝██║ ╚████╔╝ ▄███╔╝
|
██║ ██║ ██████╔╝██║ ╚████╔╝ ▄███╔╝
|
||||||
██║ ██║ ██╔══██╗██║ ╚██╔╝ ▀▀══╝
|
██║ ██║ ██╔══██╗██║ ╚██╔╝ ▀▀══╝
|
||||||
╚██████╔╝ ██║ ██║███████╗██║ ██╗
|
╚██████╔╝ ██║ ██║███████╗██║ ██╗
|
||||||
╚═════╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
╚═════╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
||||||
""") + self.SH_DEFAULT
|
""") + self.SH_DEFAULT
|
||||||
output += "\n" + "~" * (self.columns // 2)
|
output += "\n" + "~" * (self.columns // 2)
|
||||||
|
|
||||||
|
|
@ -160,7 +160,7 @@ class Display:
|
||||||
def parse_description(self, desc):
|
def parse_description(self, desc):
|
||||||
if not desc:
|
if not desc:
|
||||||
return "n/d"
|
return "n/d"
|
||||||
|
|
||||||
try:
|
try:
|
||||||
return html.fromstring(desc).text_content()
|
return html.fromstring(desc).text_content()
|
||||||
|
|
||||||
|
|
@ -540,7 +540,7 @@ class SafariBooks:
|
||||||
|
|
||||||
if "last_chapter_read" in response:
|
if "last_chapter_read" in response:
|
||||||
del response["last_chapter_read"]
|
del response["last_chapter_read"]
|
||||||
|
|
||||||
for key, value in response.items():
|
for key, value in response.items():
|
||||||
if value is None:
|
if value is None:
|
||||||
response[key] = 'n/a'
|
response[key] = 'n/a'
|
||||||
|
|
@ -553,7 +553,7 @@ class SafariBooks:
|
||||||
self.display.exit("API: unable to retrieve book chapters.")
|
self.display.exit("API: unable to retrieve book chapters.")
|
||||||
|
|
||||||
response = response.json()
|
response = response.json()
|
||||||
|
|
||||||
if not isinstance(response, dict) or len(response.keys()) == 1:
|
if not isinstance(response, dict) or len(response.keys()) == 1:
|
||||||
self.display.exit(self.display.api_error(response))
|
self.display.exit(self.display.api_error(response))
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue