Use name=orig for photos
This commit is contained in:
parent
e739466988
commit
ce79652ff5
1 changed files with 3 additions and 3 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue