mirror of
https://github.com/zedeus/nitter
synced 2026-09-05 22:59:31 +00:00
Use legacy timeline/user endpoint for Tweets tab
This commit is contained in:
parent
5725780c99
commit
624394430c
8 changed files with 81 additions and 38 deletions
|
|
@ -148,6 +148,12 @@ proc getMp4Resolution*(url: string): int =
|
|||
# cannot determine resolution (e.g. m3u8/non-mp4 video)
|
||||
return 0
|
||||
|
||||
proc getVideoViewCount*(js: JsonNode): string =
|
||||
with stats, js{"ext_media_stats"}:
|
||||
return stats{"view_count"}.getStr($stats{"viewCount"}.getInt)
|
||||
|
||||
return $js{"mediaStats", "viewCount"}.getInt(0)
|
||||
|
||||
proc extractSlice(js: JsonNode): Slice[int] =
|
||||
result = js["indices"][0].getInt ..< js["indices"][1].getInt
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue