mirror of
https://github.com/zedeus/nitter
synced 2026-10-26 20:53:25 +00:00
Add support for tweet views
This commit is contained in:
parent
0bb0b7e78c
commit
bb6eb81a20
11 changed files with 58 additions and 49 deletions
|
|
@ -231,7 +231,8 @@ proc parseTweet(js: JsonNode; jsCard: JsonNode = newJNull()): Tweet =
|
|||
replies: js{"reply_count"}.getInt,
|
||||
retweets: js{"retweet_count"}.getInt,
|
||||
likes: js{"favorite_count"}.getInt,
|
||||
quotes: js{"quote_count"}.getInt
|
||||
quotes: js{"quote_count"}.getInt,
|
||||
views: js{"views_count"}.getInt
|
||||
)
|
||||
)
|
||||
|
||||
|
|
@ -339,6 +340,9 @@ proc parseGraphTweet(js: JsonNode; isLegacy=false): Tweet =
|
|||
result.id = js{"rest_id"}.getId
|
||||
result.user = parseGraphUser(js{"core"})
|
||||
|
||||
with count, js{"views", "count"}:
|
||||
result.stats.views = count.getStr("0").parseInt
|
||||
|
||||
with noteTweet, js{"note_tweet", "note_tweet_results", "result"}:
|
||||
result.expandNoteTweetEntities(noteTweet)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue