summaryrefslogtreecommitdiffstats
path: root/gallery_dl/extractor/patreon.py
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@unit193.net>2022-03-15 00:19:57 -0400
committerLibravatarUnit 193 <unit193@unit193.net>2022-03-15 00:19:57 -0400
commitc2e774d3f5a4499b8beb5a12ab46a0099b16b1e7 (patch)
treea14107397b5bcb491aa4f4fb3e0feb4582e1879b /gallery_dl/extractor/patreon.py
parent7900ee4e3692dbd8056c3e47c81bb22eda030b65 (diff)
New upstream version 1.21.0.upstream/1.21.0
Diffstat (limited to 'gallery_dl/extractor/patreon.py')
-rw-r--r--gallery_dl/extractor/patreon.py16
1 files changed, 13 insertions, 3 deletions
diff --git a/gallery_dl/extractor/patreon.py b/gallery_dl/extractor/patreon.py
index 051f1ef..35a015f 100644
--- a/gallery_dl/extractor/patreon.py
+++ b/gallery_dl/extractor/patreon.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright 2019-2021 Mike Fährmann
+# Copyright 2019-2022 Mike Fährmann
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
@@ -71,6 +71,15 @@ class PatreonExtractor(Extractor):
name = image.get("file_name") or self._filename(url) or url
yield "image", url, name
+ def _image_large(self, post):
+ image = post.get("image")
+ if image:
+ url = image.get("large_url")
+ if url:
+ name = image.get("file_name") or self._filename(url) or url
+ return (("image_large", url, name),)
+ return ()
+
def _attachments(self, post):
for attachment in post["attachments"]:
url = self.request(
@@ -212,10 +221,11 @@ class PatreonExtractor(Extractor):
def _build_file_generators(self, filetypes):
if filetypes is None:
- return (self._images, self._attachments,
- self._postfile, self._content)
+ return (self._images, self._image_large,
+ self._attachments, self._postfile, self._content)
genmap = {
"images" : self._images,
+ "image_large": self._image_large,
"attachments": self._attachments,
"postfile" : self._postfile,
"content" : self._content,