[skeb] add option to download 'article' images (#1031)

This commit is contained in:
Mike Fährmann
2022-07-29 16:32:00 +02:00
parent 43ec315a7f
commit 8cf5981ded
3 changed files with 23 additions and 0 deletions

View File

@@ -23,6 +23,7 @@ class SkebExtractor(Extractor):
Extractor.__init__(self, match)
self.user_name = match.group(1)
self.thumbnails = self.config("thumbnails", False)
self.article = self.config("article", False)
def items(self):
for user_name, post_num in self.posts():
@@ -105,6 +106,12 @@ class SkebExtractor(Extractor):
post["file_url"] = resp["og_image_url"]
yield post
if self.article and "article_image_url" in resp:
post["content_category"] = "article"
post["file_id"] = "article"
post["file_url"] = resp["article_image_url"]
yield post
for preview in resp["previews"]:
post["content_category"] = "preview"
post["file_id"] = preview["id"]