Documentation ¶
Index ¶
- Variables
- type CssSelector
- type HtmlNode
- func (this HtmlNode) Css(selectorText string) Selectable
- func (this HtmlNode) CssWithAttr(selectorText string, attrName string) Selectable
- func (this HtmlNode) Html() string
- func (this HtmlNode) Links() Selectable
- func (this HtmlNode) Match() bool
- func (this HtmlNode) Nodes() []Selectable
- func (this HtmlNode) Regex(regex string) Selectable
- func (this HtmlNode) Replace(src, replacement string) Selectable
- func (this HtmlNode) Text() string
- type LinkSelector
- type NodeSelector
- type PlainText
- func (this PlainText) Css(selector string) Selectable
- func (this PlainText) CssWithAttr(selector string, attrName string) Selectable
- func (this PlainText) Html() string
- func (this PlainText) Links() Selectable
- func (this PlainText) Match() bool
- func (this PlainText) Nodes() []Selectable
- func (this PlainText) Regex(regex string) Selectable
- func (this PlainText) Replace(regexStr, replacement string) Selectable
- func (this PlainText) Text() string
- type RegexSelector
- type ReplaceSelector
- type Selectable
- type Selector
Constants ¶
This section is empty.
Variables ¶
View Source
var LOG = utils.NewLogger()
Functions ¶
This section is empty.
Types ¶
type CssSelector ¶
func (CssSelector) SelectList ¶
func (this CssSelector) SelectList(node *html.Node) []string
func (CssSelector) SelectNode ¶
func (this CssSelector) SelectNode(node *html.Node) *html.Node
func (CssSelector) SelectNodeList ¶
func (this CssSelector) SelectNodeList(node *html.Node) []*html.Node
type HtmlNode ¶
func (HtmlNode) Css ¶
func (this HtmlNode) Css(selectorText string) Selectable
func (HtmlNode) CssWithAttr ¶
func (this HtmlNode) CssWithAttr(selectorText string, attrName string) Selectable
has attribute, consider as plaintext
func (HtmlNode) Links ¶
func (this HtmlNode) Links() Selectable
func (HtmlNode) Nodes ¶
func (this HtmlNode) Nodes() []Selectable
func (HtmlNode) Regex ¶
func (this HtmlNode) Regex(regex string) Selectable
func (HtmlNode) Replace ¶
func (this HtmlNode) Replace(src, replacement string) Selectable
type LinkSelector ¶
type LinkSelector struct{}
func (LinkSelector) SelectList ¶
func (LinkSelector) SelectList(node *html.Node) []string
func (LinkSelector) SelectNode ¶
func (LinkSelector) SelectNode(node *html.Node) *html.Node
func (LinkSelector) SelectNodeList ¶
func (LinkSelector) SelectNodeList(node *html.Node) []*html.Node
type NodeSelector ¶
type PlainText ¶
type PlainText struct {
SourceTexts []string
}
func (PlainText) Css ¶
func (this PlainText) Css(selector string) Selectable
func (PlainText) CssWithAttr ¶
func (this PlainText) CssWithAttr(selector string, attrName string) Selectable
func (PlainText) Links ¶
func (this PlainText) Links() Selectable
func (PlainText) Nodes ¶
func (this PlainText) Nodes() []Selectable
func (PlainText) Regex ¶
func (this PlainText) Regex(regex string) Selectable
func (PlainText) Replace ¶
func (this PlainText) Replace(regexStr, replacement string) Selectable
type RegexSelector ¶
type RegexSelector struct { RegexStr string // contains filtered or unexported fields }
func NewRegexSelector ¶
func NewRegexSelector(regexStr string) (*RegexSelector, error)
func (RegexSelector) SelectString ¶
func (this RegexSelector) SelectString(src string) string
func (RegexSelector) SelectStringList ¶
func (this RegexSelector) SelectStringList(src string) []string
type ReplaceSelector ¶
type ReplaceSelector struct { RegexStr string Replacement string // contains filtered or unexported fields }
func NewReplaceSelector ¶
func NewReplaceSelector(regexStr string, replacement string) (*ReplaceSelector, error)
func (ReplaceSelector) SelectString ¶
func (this ReplaceSelector) SelectString(text string) string
func (ReplaceSelector) SelectStringList ¶
func (this ReplaceSelector) SelectStringList(regexStr string) []string
type Selectable ¶
type Selectable interface { Links() Selectable Regex(regex string) Selectable Html() string Text() string Match() bool Css(selectorText string) Selectable CssWithAttr(selectorText, attrName string) Selectable Replace(regex, replacement string) Selectable Nodes() []Selectable }
Click to show internal directories.
Click to hide internal directories.