From 7c415c43738df0a97048dc3b27cff32b1b243386 Mon Sep 17 00:00:00 2001 From: Alexander Sheiko Date: Sat, 19 Sep 2020 01:15:08 +0300 Subject: [PATCH] Fix photo --- tweets.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tweets.go b/tweets.go index fdca69c..d4b0bee 100644 --- a/tweets.go +++ b/tweets.go @@ -170,7 +170,7 @@ func readTweetsFromHTML(htm *strings.Reader) ([]*Tweet, error) { } }) s.Find(".NaturalImage-image").Each(func(i int, p *goquery.Selection) { - if link, ok := p.Attr("data-image"); ok { + if link, ok := p.Attr("src"); ok { tweet.Photos = append(tweet.Photos, link) } })