ogle

package module
v0.0.0-...-61000f8 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2017 License: MIT Imports: 7 Imported by: 0

README

ogle

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetText

func GetText(page io.Reader) string

GetText will give all the text in the document removing all the tags in the web page

func Pretty

func Pretty(page io.Reader) *bytes.Buffer

Pretty make your HTML really Pretty

Types

type Ogle

type Ogle struct {
	*html.Node
}

Ogle is a high level scraper build on top of the HTML go parser it allow you to find nodes with tags, classes and using regular expresions for the content text

func New

func New(page io.Reader) (*Ogle, error)

New ogle is a constructor to parse a io Reader

func NewFromNode

func NewFromNode(n *html.Node) *Ogle

NewFromNode Ogle accepting a html Node for inside search in a fragment

func (*Ogle) Find

func (o *Ogle) Find(matchers ...matcher.Matcher) ([]*html.Node, error)

Find allwo to find nodes that match all the Matchers

func (*Ogle) First

func (o *Ogle) First(matchers ...matcher.Matcher) (*html.Node, error)

First Return the first node that match all the matchers passed

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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