[skeb] add 'thumbnails' option (#2047) (#2051)

This commit is contained in:
Alice
2021-11-23 12:16:42 -08:00
committed by GitHub
parent 010d65dcec
commit 612850438e
2 changed files with 12 additions and 1 deletions

View File

@@ -1905,6 +1905,16 @@ Description
Download videos.
extractor.skeb.thumbnails
-------------------------
Type
``bool``
Default
``false``
Description
Download thumbnails.
extractor.smugmug.videos
------------------------
Type

View File

@@ -21,6 +21,7 @@ class SkebExtractor(Extractor):
def __init__(self, match):
Extractor.__init__(self, match)
self.user_name = match.group(1)
self.thumbnails = self.config("thumbnails", False)
def items(self):
for post_num in self.posts():
@@ -94,7 +95,7 @@ class SkebExtractor(Extractor):
return resp, post
def _get_urls_from_post(self, resp, post):
if "og_image_url" in resp:
if self.thumbnails and "og_image_url" in resp:
post["content_category"] = "thumb"
post["file_id"] = "thumb"
post["file_url"] = resp["og_image_url"]