web

package
v0.0.0-...-291e031 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2016 License: MIT Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TextChildren

func TextChildren(n *html.Node) (string, error)

Types

type Scrape

type Scrape struct {
	ScrapePredicates []ScrapePredicate
	ScrapeAction     ScrapeAction
}

func NewScraper

func NewScraper() *Scrape

func (*Scrape) Get

func (ws *Scrape) Get(uri string) (shavings ScrapeResult, err error)

type ScrapeAction

type ScrapeAction func(*html.Node) (string, error)

func AttrValue

func AttrValue(name string) ScrapeAction

type ScrapePredicate

type ScrapePredicate func(*html.Node) bool

func HasAttr

func HasAttr(name string) ScrapePredicate

func HasAttrVal

func HasAttrVal(name, value string) ScrapePredicate

func HasClass

func HasClass(class string) ScrapePredicate

type ScrapeResult

type ScrapeResult interface {
	Raw() string
	Matches() []interface{}
}

type Scraper

type Scraper interface {
	Get(uri string) (shavings ScrapeResult, err error)
}

Jump to

Keyboard shortcuts

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