mirror of
https://github.com/zedeus/nitter
synced 2026-09-06 07:09:31 +00:00
parent
68fc7b71c8
commit
3f3196d103
2 changed files with 54 additions and 32 deletions
|
|
@ -319,3 +319,13 @@ proc expandNoteTweetEntities*(tweet: Tweet; js: JsonNode) =
|
|||
tweet.expandTextEntities(entities, text, textSlice)
|
||||
|
||||
tweet.text = tweet.text.multiReplace((unicodeOpen, xmlOpen), (unicodeClose, xmlClose))
|
||||
|
||||
proc extractGalleryPhoto*(t: Tweet): GalleryPhoto =
|
||||
let url =
|
||||
if t.photos.len > 0: t.photos[0]
|
||||
elif t.video.isSome: get(t.video).thumb
|
||||
elif t.gif.isSome: get(t.gif).thumb
|
||||
elif t.card.isSome: get(t.card).image
|
||||
else: ""
|
||||
|
||||
result = GalleryPhoto(url: url, tweetId: $t.id)
|
||||
|
|
|
|||
Loading…
Reference in a new issue