diff options
Diffstat (limited to 'gallery_dl/downloader/http.py')
| -rw-r--r-- | gallery_dl/downloader/http.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gallery_dl/downloader/http.py b/gallery_dl/downloader/http.py index 179a552..8d72dc2 100644 --- a/gallery_dl/downloader/http.py +++ b/gallery_dl/downloader/http.py @@ -134,6 +134,12 @@ class HttpDownloader(DownloaderBase): self.log.warning(msg) return False + # check for invalid responses + validate = pathfmt.kwdict.get("_http_validate") + if validate and not validate(response): + self.log.warning("Invalid response") + return False + # set missing filename extension from MIME type if not pathfmt.extension: pathfmt.set_extension(self._find_extension(response)) |
