Documentation ¶
Index ¶
- Variables
- func MakeAbsoluteUrl(href, baseurl string) (string, error)
- func MatchRegex(content, pattern string) bool
- func ParseHTML(content []byte, encoding string, options ...libxml2Parser.HTMLOption) (types.Document, error)
- func ParseHTMLReader(in io.Reader, encoding string, options ...libxml2Parser.HTMLOption) (types.Document, error)
- func ParseHTMLString(content string, encoding string, options ...libxml2Parser.HTMLOption) (types.Document, error)
- func ParseRegex(content, pattern string) ([]string, error)
- func UrlEncode(rawurl string) (string, error)
- type DOMNode
- type HtmlParser
- type JsonParser
- type Parser
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrEmptyXpath = errors.New("empty xpath of node conf") ErrInvalidRuleType = errors.New("invalid rule_type of node conf") ErrEmptyRuleType = errors.New("empty rule_type of node conf") ErrEmptyItemKey = errors.New("empty item_key of node conf") )
View Source
var Parsers = make(map[string]Parser)
Functions ¶
func MakeAbsoluteUrl ¶
func MatchRegex ¶
func ParseHTML ¶
func ParseHTML(content []byte, encoding string, options ...libxml2Parser.HTMLOption) (types.Document, error)
ParseHTML parses an HTML document. You can omit the options argument, or you can provide one bitwise-or'ed option
func ParseHTMLReader ¶
func ParseHTMLReader(in io.Reader, encoding string, options ...libxml2Parser.HTMLOption) (types.Document, error)
ParseHTMLReader parses an HTML document. You can omit the options argument, or you can provide one bitwise-or'ed option
func ParseHTMLString ¶
func ParseHTMLString(content string, encoding string, options ...libxml2Parser.HTMLOption) (types.Document, error)
ParseHTMLString parses an HTML document. You can omit the options argument, or you can provide one bitwise-or'ed option
func ParseRegex ¶
Types ¶
type HtmlParser ¶
type HtmlParser struct {
Name string
}
func (HtmlParser) String ¶
func (parser HtmlParser) String() string
type JsonParser ¶
type JsonParser struct {
Name string
}
func (JsonParser) String ¶
func (parser JsonParser) String() string
Click to show internal directories.
Click to hide internal directories.