1
0
mirror of https://github.com/zedeus/nitter.git synced 2025-12-13 07:42:48 -05:00

Support promo_video_website cards

This commit is contained in:
Zed
2019-07-15 16:03:01 +02:00
parent d12f14135e
commit 27cf4cdf64
6 changed files with 48 additions and 35 deletions

View File

@@ -106,7 +106,11 @@ proc getVideo*(tweet: Tweet; token: string) {.async.} =
await getVideo(tweet, guestToken)
return
tweet.video = some(parseVideo(json))
if tweet.card.isNone:
tweet.video = some(parseVideo(json))
else:
get(tweet.card).video = some(parseVideo(json))
tweet.video = none(Video)
tokenUses.inc
proc getVideos*(thread: Thread; token="") {.async.} =