[mastodon] add 'reblogs' option (#1669)

This commit is contained in:
Mike Fährmann
2021-07-06 23:13:58 +02:00
parent 317ecc8180
commit a1f5b78039
2 changed files with 16 additions and 0 deletions

View File

@@ -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"]