[twitter] add 'birdwatch' metadata field (#5317)

should probably get a better name,
but this is what it's called internally by Twitter
This commit is contained in:
Mike Fährmann
2024-03-16 02:02:02 +01:00
parent b8e7be225c
commit 8e694d85c4
2 changed files with 13 additions and 0 deletions

View File

@@ -340,6 +340,8 @@ class TwitterExtractor(Extractor):
txt, _, tco = content.rpartition(" ")
tdata["content"] = txt if tco.startswith("https://t.co/") else content
if "birdwatch_pivot" in tweet:
tdata["birdwatch"] = tweet["birdwatch_pivot"]["subtitle"]["text"]
if "in_reply_to_screen_name" in legacy:
tdata["reply_to"] = legacy["in_reply_to_screen_name"]
if "quoted_by" in legacy: