Fix photo

This commit is contained in:
Alexander Sheiko 2020-09-19 01:15:08 +03:00
parent 69c8b035ea
commit 7c415c4373

View file

@ -170,7 +170,7 @@ func readTweetsFromHTML(htm *strings.Reader) ([]*Tweet, error) {
} }
}) })
s.Find(".NaturalImage-image").Each(func(i int, p *goquery.Selection) { 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) tweet.Photos = append(tweet.Photos, link)
} }
}) })