diff --git a/internal/embed/detect.go b/internal/embed/detect.go index 97d4c5e..7340512 100644 --- a/internal/embed/detect.go +++ b/internal/embed/detect.go @@ -128,7 +128,8 @@ type fxTwitterResponse struct { Height int `json:"height"` } `json:"photos"` Videos []struct { - URL string `json:"url"` + URL string `json:"url"` + ThumbnailURL string `json:"thumbnail_url"` } `json:"videos"` } `json:"media"` IsNoteTweet bool `json:"is_note_tweet"` @@ -204,11 +205,8 @@ func parseFxTwitterResponse(fxResp *fxTwitterResponse, tweetID string, originalU if len(tweet.Media.Videos) > 0 { videoURL = tweet.Media.Videos[0].URL + thumbnailURL = tweet.Media.Videos[0].ThumbnailURL mediaType = "video" - // Videos usually have a poster/thumbnail in photos - if len(tweet.Media.Photos) > 0 { - thumbnailURL = tweet.Media.Photos[0].URL - } } else if len(tweet.Media.Photos) > 0 { thumbnailURL = tweet.Media.Photos[0].URL for _, photo := range tweet.Media.Photos {