From bb32a2d490ee65f9513c3169899622cb1a5cfe7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Mon, 20 May 2019 15:46:59 +0200 Subject: [PATCH] [patreon] use file extensions from original filenames (#268) --- gallery_dl/extractor/patreon.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/gallery_dl/extractor/patreon.py b/gallery_dl/extractor/patreon.py index 32d5fbc3..4884497e 100644 --- a/gallery_dl/extractor/patreon.py +++ b/gallery_dl/extractor/patreon.py @@ -43,24 +43,23 @@ class PatreonExtractor(Extractor): if postfile: post["num"] += 1 - url = postfile["url"] - yield Message.Url, url, text.nameext_from_url(url, post) + text.nameext_from_url(postfile["name"], post) + yield Message.Url, postfile["url"], post for attachment in post["attachments"]: post["num"] += 1 - url = attachment["url"] - yield Message.Url, url, text.nameext_from_url(url, post) + text.nameext_from_url(attachment["name"], post) + yield Message.Url, attachment["url"], post def posts(self): """Return all relevant post objects""" def _pagination(self, url): headers = {"Referer": self.root} - params = {} empty = [] while url: - posts = self.request(url, headers=headers, params=params).json() + posts = self.request(url, headers=headers).json() if "included" not in posts: return