diff options
| author | 2021-02-16 21:35:52 -0500 | |
|---|---|---|
| committer | 2021-02-16 21:35:52 -0500 | |
| commit | fc83315c164afd74734adf27e0f7fec2011904aa (patch) | |
| tree | d5976be93924dc4cd76c41e5e3f13bb44b6516b3 /gallery_dl/downloader | |
| parent | 2e29d2158d56879e5578dfabf9e8c0fa2e855ccf (diff) | |
New upstream version 1.16.5.upstream/1.16.5
Diffstat (limited to 'gallery_dl/downloader')
| -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)) |
