merge #5802: [twitter] extract 'bookmark_count' and 'view_count'

pull/5824/head
Mike Fährmann 3 months ago
commit 29eb535e18
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

@ -321,8 +321,17 @@ class TwitterExtractor(Extractor):
"quote_count" : tget("quote_count"),
"reply_count" : tget("reply_count"),
"retweet_count" : tget("retweet_count"),
"bookmark_count": tget("bookmark_count"),
}
if "views" in tweet:
try:
tdata["view_count"] = int(tweet["views"]["count"])
except Exception:
tdata["view_count"] = 0
else:
tdata["view_count"] = 0
if "note_tweet" in tweet:
note = tweet["note_tweet"]["note_tweet_results"]["result"]
content = note["text"]

Loading…
Cancel
Save