From ae913c7d8894ab3bbf5cd2930ee663c766a9af99 Mon Sep 17 00:00:00 2001 From: Alexander Sheiko Date: Sat, 19 Sep 2020 11:30:05 +0300 Subject: [PATCH] Fix photo --- tweets.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tweets.go b/tweets.go index d4b0bee..47634a4 100644 --- a/tweets.go +++ b/tweets.go @@ -170,8 +170,8 @@ func readTweetsFromHTML(htm *strings.Reader) ([]*Tweet, error) { } }) s.Find(".NaturalImage-image").Each(func(i int, p *goquery.Selection) { - if link, ok := p.Attr("src"); ok { - tweet.Photos = append(tweet.Photos, link) + if link, ok := p.Attr("data-image"); ok { + tweet.Photos = append(tweet.Photos, link+"?format=jpg&name=large") } }) // s.Find(".PlayableMedia-player").Each(func(i int, v *goquery.Selection) {