[patreon] download 'large_url' images if available (#2257)

This commit is contained in:
Mike Fährmann
2022-02-17 18:23:59 +01:00
parent f5b2b9333f
commit 4fee3a0e52

View File

@@ -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
@@ -65,6 +65,12 @@ class PatreonExtractor(Extractor):
return ()
def _images(self, post):
image = post.get("image")
if image:
url = image.get("large_url") or image["url"]
name = image.get("file_name") or self._filename(url) or url
yield "image", url, name
for image in post["images"]:
url = image.get("download_url")
if url: