diff options
| author | 2020-03-16 23:20:15 -0400 | |
|---|---|---|
| committer | 2020-03-16 23:20:15 -0400 | |
| commit | e8cc000750de972384f2f34d02d42222b4018ae9 (patch) | |
| tree | 26eb0bacedff7480d29bafcf184ca529cf9f1d9f /gallery_dl/downloader | |
| parent | 4366125d2580982abb57bc65a26fc1fb8ef2a5df (diff) | |
New upstream version 1.13.2upstream/1.13.2
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 9cd2aa6..844e422 100644 --- a/gallery_dl/downloader/http.py +++ b/gallery_dl/downloader/http.py @@ -193,6 +193,9 @@ class HttpDownloader(DownloaderBase): mtype = response.headers.get("Content-Type", "image/jpeg") mtype = mtype.partition(";")[0] + if "/" not in mtype: + mtype = "image/" + mtype + if mtype in MIMETYPE_MAP: return MIMETYPE_MAP[mtype] @@ -231,6 +234,8 @@ MIMETYPE_MAP = { "image/png": "png", "image/gif": "gif", "image/bmp": "bmp", + "image/x-bmp": "bmp", + "image/x-ms-bmp": "bmp", "image/webp": "webp", "image/svg+xml": "svg", @@ -247,6 +252,7 @@ MIMETYPE_MAP = { "application/zip": "zip", "application/x-zip": "zip", "application/x-zip-compressed": "zip", + "application/rar": "rar", "application/x-rar": "rar", "application/x-rar-compressed": "rar", "application/x-7z-compressed": "7z", |
