Documentation
¶
Index ¶
- func DocumentFromUrl(urlRef string) (*goquery.Document, error)
- func HtmlNodeGrepAttr(node *html.Node, attrName string, reg *regexp.Regexp) string
- func NodeContainsText(node *html.Node, text string) bool
- func NodeGrepAllHref(node *html.Node) []string
- func NodeGrepHref(node *html.Node, reg *regexp.Regexp) string
- func NodeSearchAttr(node *html.Node, attrName string) string
- func NodeSearchAttrEq(node *html.Node, attrName string, attrValue string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DocumentFromUrl ¶
DocumentFromUrl builds a goquery.Document from urlRef.
func HtmlNodeGrepAttr ¶
HtmlNodeGrepAttr greps value of given attrName with reg. If attr value does not match reg, return an empty string. If reg is nil, use strings.Contains to match attr value.
func NodeContainsText ¶
NodeContainsText checks whether node contains text.
func NodeGrepAllHref ¶
NodeGrepAllHref greps all href inside node and its children.
func NodeGrepHref ¶
NodeGrepHref greps a href link that matches regexp in node. Return link when regexp is nil.
func NodeSearchAttr ¶
NodeSearchAttr searches html node, find attr's value and return.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.