mirror of
https://github.com/mikf/gallery-dl.git
synced 2024-11-22 02:32:33 +01:00
[mastodon] add 'reblogs' option (#1669)
This commit is contained in:
parent
317ecc8180
commit
a1f5b78039
@ -1269,6 +1269,16 @@ Description
|
||||
Provide ``artist``, ``author``, and ``group`` metadata fields.
|
||||
|
||||
|
||||
extractor.mastodon.reblogs
|
||||
--------------------------
|
||||
Type
|
||||
``bool``
|
||||
Default
|
||||
``false``
|
||||
Description
|
||||
Extract media from reblogged posts.
|
||||
|
||||
|
||||
extractor.mastodon.text-posts
|
||||
-----------------------------
|
||||
Type
|
||||
|
@ -27,7 +27,13 @@ class MastodonExtractor(BaseExtractor):
|
||||
self.item = match.group(match.lastindex)
|
||||
|
||||
def items(self):
|
||||
reblogs = self.config("reblogs", False)
|
||||
|
||||
for status in self.statuses():
|
||||
if not reblogs and status["reblog"]:
|
||||
self.log.debug("Skipping %s (reblog)", status["id"])
|
||||
continue
|
||||
|
||||
attachments = status["media_attachments"]
|
||||
del status["media_attachments"]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user