1
0
mirror of https://github.com/zedeus/nitter.git synced 2026-01-26 13:22:49 -05:00

Support video embeds

Fixes #66
This commit is contained in:
Zed
2019-12-06 15:15:56 +01:00
parent f9c4acabf8
commit ebd7afe464
10 changed files with 98 additions and 37 deletions

View File

@@ -94,6 +94,7 @@ proc getVideoFetch(tweet: Tweet; agent, token: string; retry=true): Future[Optio
tokenUses.inc
proc getVideo*(tweet: Tweet; agent, token: string; force=false) {.async.} =
let token = if token.len == 0: guestToken else: token
var video = getCachedVideo(tweet.id)
if video.isNone:
video = await getVideoFetch(tweet, agent, token)