Get Metadata from HTML
go get -u github.com/golibri/fetch
go get -u github.com/golibri/website
import "github.com/golibri/website"
func main() {
ws := website.FromURL("http://example.com/whatever")
// OR:
ws := website.Parse("website-html-string")
// ws is a Website object, see below
}
A Website has the following data fields:
type Website struct {
URL string
Body string
Language string
Title string
Description string
Image string
Favicon string
Feeds []string
Tags []string
}
LGPLv3. (You can use it in commercial projects as you like, but improvements/bugfixes must flow back to this lib.)