scrape

package module
v0.0.0-...-8bbc131 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2021 License: MIT Imports: 3 Imported by: 1

README

scrape

Simple scraping package

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Attr

func Attr(node *html.Node, key string) string

Attr return value of attribute.

func FindAll

func FindAll(node *html.Node, matcher func(*html.Node) bool) []*html.Node

FindAll return all nodes that match matcher function.

func Text

func Text(node *html.Node) string

Text return joined textdata from all child `html.TextNode` node.

Types

type Matcher

type Matcher func(*html.Node) bool

Matcher should return true if you desire to select node.

func ByTag

func ByTag(tag atom.Atom) Matcher

ByTag return `Matcher` that match node that have specified tag.

Jump to

Keyboard shortcuts

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