Documentation
¶
Index ¶
- func Errorf(format string, v ...interface{}) error
- type HTMLDom
- func (t *HTMLDom) DomFind(selector string) *goquery.Selection
- func (t *HTMLDom) GetNodeText(node *html.Node) string
- func (t *HTMLDom) Match(rule string) string
- func (t *HTMLDom) MatchAll(rule string) []string
- func (t *HTMLDom) NodeAttr(node *html.Node, attr string) string
- func (t *HTMLDom) NodeHTML(node *html.Node) string
- func (t *HTMLDom) NodeText(node *html.Node) string
- type JSONPath
- type Parser
- type Regexp
- type Substring
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type HTMLDom ¶
type HTMLDom struct {
// contains filtered or unexported fields
}
HTMLDom HTML Selector 解析器,类似jQuery的选择器, document.querySelector
func (*HTMLDom) DomFind ¶
DomFind use document find a selector return html you can use chrome to select the dom selector, then .Html() fetch the special dom html
func (*HTMLDom) GetNodeText ¶
GetNodeText Get the specified node's text content.
type JSONPath ¶
type JSONPath struct {
// contains filtered or unexported fields
}
JSONPath JSON Path解析器
type Parser ¶
type Parser interface { // Match 配置规则,返回匹配到的值 Match(rule string) string // Match 配置规则,返回匹配到的值,复数 MatchAll(rule string) []string }
Parser 字段分析接口
type Regexp ¶
type Regexp struct {
// contains filtered or unexported fields
}
Regexp 正则解析器
type Substring ¶
type Substring struct {
// contains filtered or unexported fields
}
Substring 字符串匹配
func (*Substring) RegexpMatchAll ¶
RegexpMatchAll use regexp to match contents, but not real regexp, just support this: <li>(*)</li>
func (*Substring) StrMatchAll ¶
StrMatchAll use begin and end code to match all contents
Click to show internal directories.
Click to hide internal directories.