improve downloader retry behavior
- only retry download on 5xx and 429 status codes - immediately fail on 4xx status codes
This commit is contained in:
@@ -17,6 +17,8 @@ Exception
|
||||
| +-- AuthorizationError
|
||||
| +-- NotFoundError
|
||||
| +-- HttpError
|
||||
+-- DownloadError
|
||||
+-- DownloadComplete
|
||||
+-- NoExtractorError
|
||||
+-- FormatError
|
||||
+-- FilterError
|
||||
@@ -48,6 +50,14 @@ class HttpError(ExtractionError):
|
||||
"""HTTP request during extraction failed"""
|
||||
|
||||
|
||||
class DownloadError(GalleryDLException):
|
||||
"""Error during file download"""
|
||||
|
||||
|
||||
class DownloadComplete(GalleryDLException):
|
||||
"""Output file of attempted download is already complete"""
|
||||
|
||||
|
||||
class NoExtractorError(GalleryDLException):
|
||||
"""No extractor can handle the given URL"""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user