package main
import (
"fmt"
"github.com/otiai10/opengraph"
)
func main() {
og, err := opengraph.Fetch("https://www.youtube.com/watch?v=5blm22DeeHY")
fmt.Printf("OpenGraph: %+v\nError: %v\n", og, err)
}
% go get github.com/otiai10/opengraph/ogp
% ogp --help
For more details, see ogp/main.go.
og.Parse(body *io.Reader)
to re-use*http.Response
og.HTTPClient
to customize*http.Client
for fetchingog.ToAbsURL()
to restore relative URL, e.g.og.Favicon
You ain't gonna need itog.Fulfill()
to fill empty fileds.