htmlscrape

package
v0.0.0-...-2840294 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2015 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

This is an utility library for use with golang.org/x/net/html. Its main purpose is, to extract parts of HTML files and to Serialize them.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractText

func ExtractText(h *html.Node) string

func ExtractTextIO

func ExtractTextIO(h *html.Node, w io.Writer)

func FindTB

func FindTB(n *html.Node) (t *html.Node, b *html.Node)

finds title and body in an html doc

func LurkFor

func LurkFor(n *html.Node, sel string) *html.Node

finds title and body in an html doc

func Render

func Render(w io.Writer, n *html.Node) error

like html.Render but renders only the child elements.

func Walk

func Walk(n *html.Node, fn Transf)

Types

type Transf

type Transf func(*html.Node)

func Chain

func Chain(t ...Transf) Transf

func ReplaceHref

func ReplaceHref(f func(string) string) Transf

Jump to

Keyboard shortcuts

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