Skip to content

Commit

Permalink
remove trailing spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
gudata committed Sep 25, 2021
1 parent 4a56587 commit 10b400a
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions safaribooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,20 +138,20 @@ def save_last_request(self):

def intro(self):
output = self.SH_YELLOW + ("""
____ ___ _
/ __/__ _/ _/__ _____(_)
_\ \/ _ `/ _/ _ `/ __/ /
/___/\_,_/_/ \_,_/_/ /_/
/ _ )___ ___ / /__ ___
/ _ / _ \/ _ \/ '_/(_-<
/____/\___/\___/_/\_\/___/
____ ___ _
/ __/__ _/ _/__ _____(_)
_\ \/ _ `/ _/ _ `/ __/ /
/___/\_,_/_/ \_,_/_/ /_/
/ _ )___ ___ / /__ ___
/ _ / _ \/ _ \/ '_/(_-<
/____/\___/\___/_/\_\/___/
""" if random() > 0.5 else """
██████╗ ██████╗ ██╗ ██╗ ██╗██████╗
██████╗ ██████╗ ██╗ ██╗ ██╗██████╗
██╔═══██╗ ██╔══██╗██║ ╚██╗ ██╔╝╚════██╗
██║ ██║ ██████╔╝██║ ╚████╔╝ ▄███╔╝
██║ ██║ ██╔══██╗██║ ╚██╔╝ ▀▀══╝
╚██████╔╝ ██║ ██║███████╗██║ ██╗
╚═════╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
██║ ██║ ██╔══██╗██║ ╚██╔╝ ▀▀══╝
╚██████╔╝ ██║ ██║███████╗██║ ██╗
╚═════╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
""") + self.SH_DEFAULT
output += "\n" + "~" * (self.columns // 2)

Expand All @@ -160,7 +160,7 @@ def intro(self):
def parse_description(self, desc):
if not desc:
return "n/d"

try:
return html.fromstring(desc).text_content()

Expand Down Expand Up @@ -540,7 +540,7 @@ def get_book_info(self):

if "last_chapter_read" in response:
del response["last_chapter_read"]

for key, value in response.items():
if value is None:
response[key] = 'n/a'
Expand All @@ -553,7 +553,7 @@ def get_book_chapters(self, page=1):
self.display.exit("API: unable to retrieve book chapters.")

response = response.json()

if not isinstance(response, dict) or len(response.keys()) == 1:
self.display.exit(self.display.api_error(response))

Expand Down

0 comments on commit 10b400a

Please sign in to comment.