[bluesky] add 'instance' metadata field (#4438)

This commit is contained in:
Mike Fährmann
2024-03-18 04:32:45 +01:00
parent 718c870430
commit da6ba60331
2 changed files with 4 additions and 1 deletions

View File

@@ -40,6 +40,7 @@ class BlueskyExtractor(Extractor):
self.api = BlueskyAPI(self)
self._user = self._user_did = None
self.instance = self.root.partition("://")[2]
def items(self):
for post in self.posts():
@@ -81,6 +82,7 @@ class BlueskyExtractor(Extractor):
if self._metadata_user:
post["user"] = self._user or post["author"]
post["instance"] = self.instance
post["post_id"] = pid
post["count"] = len(images)
post["date"] = text.parse_datetime(