better error message
This commit is contained in:
parent
a4772a94c6
commit
6e1b143cb6
1 changed files with 3 additions and 4 deletions
7
main.py
7
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
|
||||
|
|
Reference in a new issue