Skip to content

golibri/website

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status Code Climate GoDoc Built with Spacemacs

golibri/website

Get Metadata from HTML

Requirements

go get -u github.com/golibri/fetch

installation

go get -u github.com/golibri/website

usage

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
}

data fields

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
    }

license

LGPLv3. (You can use it in commercial projects as you like, but improvements/bugfixes must flow back to this lib.)

Releases

No releases published

Packages

No packages published