From bd5ce9855c471652fe569cdf225c55483e5f5c7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Tue, 14 Jan 2020 11:53:32 +0100 Subject: [PATCH] allow GalleryExtractors to set URL-independent extensions --- gallery_dl/extractor/common.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gallery_dl/extractor/common.py b/gallery_dl/extractor/common.py index 380bcc70..55b15d44 100644 --- a/gallery_dl/extractor/common.py +++ b/gallery_dl/extractor/common.py @@ -344,7 +344,11 @@ class GalleryExtractor(Extractor): for data[self.enum], (url, imgdata) in images: if imgdata: data.update(imgdata) - yield Message.Url, url, text.nameext_from_url(url, data) + if "extension" not in imgdata: + text.nameext_from_url(url, data) + else: + text.nameext_from_url(url, data) + yield Message.Url, url, data def login(self): """Login and set necessary cookies"""