# README
Open Graph Parser for Golang
Code Example
package main
import (
"fmt"
"github.com/otiai10/opengraph"
)
func main() {
og, err := opengraph.Fetch("http://github.com/otiai10/too")
fmt.Printf("OpenGraph: %+v\nError: %v\n", og, err)
}
cli as a working example
% go get github.com/otiai10/opengraph/ogp
% ogp --help
For more details, see ogp/main.go.
advanced
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.
# Packages
No description provided by the author
# Structs
Link represents any "<link ...>" HTML tag.
Meta represents any "<meta ...>" HTML tag.
OGAudio represents "og:audio" structure.
OGImage represents "og:image" structure.
OGVideo represents "og:video" structure.
OpenGraph represents web page information according to OGP <ogp.me>, and some more additional informations like URL.Host and so.
Title represents any "<title ...>" HTML tag.
URL includes *url.URL.