Fix image grids not being recognized as photos
This commit is contained in:
parent
5199492b31
commit
648743f47f
1 changed files with 5 additions and 0 deletions
|
|
@ -174,6 +174,11 @@ func readTweetsFromHTML(htm *strings.Reader) ([]*Tweet, error) {
|
|||
tweet.Photos = append(tweet.Photos, link+"?format=jpg&name=large")
|
||||
}
|
||||
})
|
||||
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")
|
||||
}
|
||||
})
|
||||
// s.Find(".PlayableMedia-player").Each(func(i int, v *goquery.Selection) {
|
||||
// if style, ok := v.Attr("style"); ok {
|
||||
// if strings.Contains(style, "background") {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue