Fix gif parsing

This commit is contained in:
Zed 2019-06-20 22:46:15 +02:00
parent 6103db6893
commit 7667371f5f
1 changed files with 1 additions and 1 deletions

View File

@ -80,7 +80,7 @@ proc parseTweet*(tweet: XmlNode): Tweet =
if player.len > 0: if player.len > 0:
let thumb = player.replace(re".+:url\('([^']+)'\)", "$1") let thumb = player.replace(re".+:url\('([^']+)'\)", "$1")
if "tweet_video" in thumb: if "tweet_video" in thumb:
result.gif = some(thumb.replace(re".+thumb/([^\.']+)\.jpg.+", "$1")) result.gif = some(thumb.replace(re".+thumb/([^\.']+)\.jpg.*", "$1"))
else: else:
result.videoThumb = some(thumb) result.videoThumb = some(thumb)