Documentation ¶
Overview ¶
Package stew ... Is a lightweight extensible web scraping package
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ElemLookup ¶
ElemLookup ... Is a functor type for DOM-tree BFS
func Find ¶
func Find(attrKey, attrVal string) ElemLookup
Find ... Returns functor looking for elements matching input attr key-val pair
func FindAll ¶
func FindAll(tags ...string) ElemLookup
FindAll ... Returns functor looking for elements with input tags
type Stew ¶
type Stew struct { // Breadth-first position of element Pos uint // Tag name of current node Tag string // Pointer to parent node Parent *Stew // Pointers to children node Children []*Stew // Descs maps descendent tag name to Stew nodes Descs DescMap // discarding order information for searchability // Attrs ... map attribute key to value // empty string attrs key is the text content Attrs map[string][]string }
Stew ... Is a queryable alternative to html.Node
func NewFromNode ¶
NewFromNode ... Traverses through input root node and returns the Stew tree root
func NewFromReader ¶
func NewFromReader(body io.ReadCloser) *Stew
NewFromReader ... Parses input html reader source and returns the Stew tree root
func NewFromRes ¶
NewFromRes ... Parses input response and returns the Stew tree root
Click to show internal directories.
Click to hide internal directories.