diff --git a/main.py b/main.py index 102c8ad..b5e4983 100644 --- a/main.py +++ b/main.py @@ -16,8 +16,8 @@ class Scraper: "redirect": "index.php" } - def errorFormat(self, code: int) -> str: - return f"\Error: [{code}]" + def errorFormat(self, code: int, message: str = "") -> str: + return f"\Error: [{code}]{' ' if len(message) > 0 else ''}{message}" def connect(self): session = create_scraper(browser = {"browser": "chrome", "platform": "windows"}) @@ -38,13 +38,12 @@ class Scraper: return session def search(self, session): - link = "No link for your application was found." + return link def work(self): session = self.connect() - link = self.search(session) return link