diff --git a/docs/configuration.rst b/docs/configuration.rst index 42c45485..5b29d967 100644 --- a/docs/configuration.rst +++ b/docs/configuration.rst @@ -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 diff --git a/gallery_dl/extractor/mastodon.py b/gallery_dl/extractor/mastodon.py index 9785fc6e..d9aaafc4 100644 --- a/gallery_dl/extractor/mastodon.py +++ b/gallery_dl/extractor/mastodon.py @@ -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"]