Documentation ¶
Overview ¶
Package scrape is an internal package of the tool Crawl, responsible for extracting data from web pages. It does not allow for some likely use cases that don't come up in a crawl, like identifying tags based only on the value of some attribute.
Index ¶
- func Attribute(key string, n *html.Node) string
- func Classes(node *html.Node) []string
- func NodeByID(id string, node *html.Node) *html.Node
- func NodesByClassName(class string, node *html.Node) []*html.Node
- func NodesByName(name string, node *html.Node) []*html.Node
- func NodesByTagName(tag string, node *html.Node) []*html.Node
- func Query(tag string, attrs map[string]string, n *html.Node) *html.Node
- func QueryAll(tag string, attrs map[string]string, n *html.Node) []*html.Node
- func Text(n *html.Node) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Query ¶
Query returns a the first *html.Node that appears in the tree n, with tag name tag, and whose attributes match those described by attrs.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.