From bc957b060739e9887231b49f7c82ec014e67ea59 Mon Sep 17 00:00:00 2001 From: "karl.hudgell" Date: Wed, 23 Feb 2022 08:47:31 +0000 Subject: [PATCH] replace litterals and cross platform cls --- GoGoDownloader.py | 4 ++-- backend.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/GoGoDownloader.py b/GoGoDownloader.py index dbea96d..b742acc 100644 --- a/GoGoDownloader.py +++ b/GoGoDownloader.py @@ -17,7 +17,7 @@ except AttributeError: def gogodownloader(config): CURRENT_DOMAIN = config["CurrentGoGoAnimeDomain"] - os.system("cls") + os.system("cls" if os.name == "nt" else "clear") while True: print( f""" {Fore.LIGHTBLUE_EX} @@ -166,7 +166,7 @@ def gogodownloader(config): use_again = input(f"{IN}Do you want to use the app again? (y|n) > ").lower() if use_again == "y": - os.system("cls") + os.system("cls" if os.name == "nt" else "clear") else: break diff --git a/backend.py b/backend.py index ab3a119..6d0b3fb 100644 --- a/backend.py +++ b/backend.py @@ -126,7 +126,7 @@ class gogoanime: ) soup = BeautifulSoup(page.content, "html.parser") loginCheck = soup(text=re.compile("Logout")) - if len(loginCheck) is 0: + if len(loginCheck) == 0: raise Exception( "User is not logged in, make sure account has been activated" )