Use name=orig for photos

This commit is contained in:
Alexander Sheiko 2020-10-12 09:49:56 +03:00
parent e739466988
commit ce79652ff5

View file

@ -171,12 +171,12 @@ 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 {
tweet.Photos = append(tweet.Photos, link+"?format=jpg&name=large")
tweet.Photos = append(tweet.Photos, link+"?format=jpg&name=orig")
}
})
s.Find(".CroppedImage-image").Each(func(i int, p *goquery.Selection) {
if link, ok := p.Attr("data-image"); ok {
tweet.Photos = append(tweet.Photos, link+"?format=jpg&name=large")
tweet.Photos = append(tweet.Photos, link+"?format=jpg&name=orig")
}
})
// s.Find(".PlayableMedia-player").Each(func(i int, v *goquery.Selection) {