crawler

package
v0.0.0-...-4337d54 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 3, 2013 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compact

func Compact(words []string) []string

func Parse

func Parse(content string) ([]string, []string)

Types

type Crawler

type Crawler struct {
	// contains filtered or unexported fields
}

func NewCrawler

func NewCrawler(userAgent, rawurl string) *Crawler

func (*Crawler) Crawl

func (c *Crawler) Crawl() (*Metadata, error)

Get the gatekeeper (robots.txt) from the site. Get the HTML and parse it.

func (*Crawler) GetHTML

func (c *Crawler) GetHTML() (string, error)

Attach our user agent to the headers and make the request.

type Metadata

type Metadata struct {
	Site            string
	Links, Keywords []string
}

func (*Metadata) Save

func (m *Metadata) Save() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL