added a new custom exception, and an api, to fetch direct url

This commit is contained in:
Hellow2
2023-06-12 10:16:56 +02:00
parent 10f6153199
commit ff5a79a3c7
4 changed files with 32 additions and 35 deletions

View File

@@ -0,0 +1,11 @@
class DownloadException(Exception):
pass
class UrlNotFoundException(DownloadException):
def __init__(self, url: str, *args: object) -> None:
self.url = url
super().__init__(*args)
def __str__(self) -> str:
return f"Couldn't find the page of {self.url}"