From fac6c022243c2afcf0f593628b019918fa494732 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Mon, 19 Jun 2017 09:24:00 +0200 Subject: [PATCH] [downloader] fix extension from content-type --- gallery_dl/downloader/http.py | 1 + 1 file changed, 1 insertion(+) diff --git a/gallery_dl/downloader/http.py b/gallery_dl/downloader/http.py index 3a22a25d..33a6d55a 100644 --- a/gallery_dl/downloader/http.py +++ b/gallery_dl/downloader/http.py @@ -65,6 +65,7 @@ class Downloader(BasicDownloader): if not pathfmt.has_extension: # set 'extension' keyword from Content-Type header mtype = response.headers.get("Content-Type", "image/jpeg") + mtype = mtype.partition(";")[0] exts = mimetypes.guess_all_extensions(mtype, strict=False) if exts: exts.sort()