badoux / goscraper

Golang pkg to quickly return a preview of a webpage (title/description/images)
MIT License
105 stars 39 forks source link

Maybe generate screenshot from page? #1

Closed rogierlommers closed 6 years ago

rogierlommers commented 7 years ago

Thanks for your package; I'm using it in my "greedy app". It would be great if you can add some kind of screenshot generation of the page which is being scraped?

type DocumentPreview struct {
  Title             string
  Description string
  Images        []string
  Link             string
  Screenshot []bytes   // rendered screenshot of the scraped url
}
itsdarrylnorris commented 6 years ago

@rogierlommers , I think this will be an interesting idea. However, it looks like is going to require quite of work. I could be wrong.

Here is a package that looks promising. https://github.com/sensepost/gowitness

rogierlommers commented 6 years ago

I will check it out; thanks.