Explorar o código

Fix gif parsing

Zed %!s(int64=7) %!d(string=hai) anos
pai
achega
7667371f5f
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/parser.nim

+ 1 - 1
src/parser.nim

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