1
0
mirror of https://github.com/zedeus/nitter.git synced 2026-05-03 19:12:20 -04:00

Implement mixed-media tweet support

Fixes #697 #1101
This commit is contained in:
Zed
2026-03-13 05:47:37 +01:00
parent 4bf3df94f8
commit 35a929c415
15 changed files with 304 additions and 174 deletions

View File

@@ -352,9 +352,7 @@ proc expandBirdwatchEntities*(text: string; entities: JsonNode): string =
proc extractGalleryPhoto*(t: Tweet): GalleryPhoto =
let url =
if t.photos.len > 0: t.photos[0].url
elif t.video.isSome: get(t.video).thumb
elif t.gif.isSome: get(t.gif).thumb
if t.media.len > 0: t.media[0].getThumb
elif t.card.isSome: get(t.card).image
else: ""