improve downloader retry behavior

- only retry download on 5xx and 429 status codes
- immediately fail on 4xx status codes
This commit is contained in:
Mike Fährmann
2017-11-10 21:35:53 +01:00
parent 5ee8ca0319
commit 79bcaa8726
6 changed files with 37 additions and 17 deletions

View File

@@ -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"""