Bulk asynchronous downloader for multiple file hosts
Python asynciobunkrcyberdropdownloaderdropboxfilestergofilegoogle-drivemediafiremegamega-nzonedrivepatreonpawchivepinterestpixeldraintransfer-ittwitchtwittervk
Add downloadfailure to errors file
Jules-WinnfieldX9d7875fe11e3
diff --git a/cyberdrop_dl/clients/errors.py b/cyberdrop_dl/clients/errors.pyindex 0111b8fa2..18a730641 100644--- a/cyberdrop_dl/clients/errors.py+++ b/cyberdrop_dl/clients/errors.py@@ -1,6 +1,7 @@class InvalidContentTypeFailure(Exception):- def __init__(self, *, message: str = "Failed login."):+ """This error will be thrown when the content type isn't as expected"""+ def __init__(self, *, message: str = "Invalid content type"):self.message = messagesuper().__init__(self.message)@@ -10,3 +11,12 @@ class NoExtensionFailure(Exception):def __init__(self, *, message: str = "Extension missing for file"):self.message = messagesuper().__init__(self.message)+++class DownloadFailure(Exception):+ """This error will be thrown when a download fails"""+ def __init__(self, status: int, message: str = "Something went wrong"):+ self.status = status+ self.message = message+ super().__init__(self.message)+ super().__init__(self.status)