A Golang project allowing retrieval of HTML metadata of content driven sites.
First, install golang if you haven't already. Then run
go get github.com/briannewsom/metamonster
go install github.com/briannewsom/metamonstermetamonster will now live at $GOPATH/bin/metamonster. I recommend adding $GOPATH/bin to your PATH for simplicity.
metamonster -h
Usage of metamonster:
-format="plaintext": Output data format. Options - [json,plaintext]
-url="": URL from which to retrieve metadataOr, as an example
metamonster -url="https://medium.com/@sarah_k_mock/meat-is-dead-long-live-meat-a86a7cfe7ecf" -format=jsonimport (
"github.com/briannewsom/metamonster/fetcher"
"github.com/briannewsom/metamonster/models/metadata"
)
func main(){
url := "https://medium.com/@sarah_k_mock/meat-is-dead-long-live-meat-a86a7cfe7ecf"
m, err := fetcher.GetInfoForUrl(url)
metadata.PrintMetadata(*m)
}go test ./...