lib

package
v0.0.0-...-a45123f Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2014 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Follow

func Follow(url string) (string, int)

func Get

func Get(url string, headers map[string]string) (string, int)

func Shorten

func Shorten(input string) (short string, status int)

Types

type EachFunc

type EachFunc func(int, *goquery.Selection)

EachFunc is a goquery iterator func

type Parser

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

Parser is a simple HTML parser

func NewParser

func NewParser(url string, ctx *otto.Otto) (*Parser, error)

NewParser takes a url, does a HTTP get, builds a doc and return a parser or any error

func (*Parser) Find

func (p *Parser) Find(call otto.FunctionCall) otto.Value

Find takes a CSS selector and an EachFunc and applies them to the doc

func (*Parser) Results

func (p *Parser) Results() otto.Value

Jump to

Keyboard shortcuts

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