Documentation
¶
Index ¶
- Constants
- Variables
- type NodeEnum
- type NodeSet
- func (p NodeSet) A() (ret NodeSet)
- func (p NodeSet) All() NodeSet
- func (p NodeSet) Any() (ret NodeSet)
- func (p NodeSet) AttrVal(k string, exactlyOne ...bool) (text string, err error)
- func (p NodeSet) Attr__0(k string, exactlyOne ...bool) (text string, err error)
- func (p NodeSet) Attr__1(k, v string) (ret NodeSet)
- func (p NodeSet) Attribute__0(k, v string) (ret NodeSet)
- func (p NodeSet) Attribute__1(k string, filter func(v string) bool) (ret NodeSet)
- func (p NodeSet) Child() (ret NodeSet)
- func (p NodeSet) ChildEqualText(text string) (ret NodeSet)
- func (p NodeSet) ChildN(level int) (ret NodeSet)
- func (p NodeSet) ChildrenAsText(doReplace bool) (ret NodeSet)
- func (p NodeSet) Class(v string) (ret NodeSet)
- func (p NodeSet) Collect() (items []*html.Node, err error)
- func (p NodeSet) CollectOne__0() (item *html.Node, err error)
- func (p NodeSet) CollectOne__1(exactly bool) (item *html.Node, err error)
- func (p NodeSet) ContainsClass(v string) (ret NodeSet)
- func (p NodeSet) Div() (ret NodeSet)
- func (p NodeSet) Dl() (ret NodeSet)
- func (p NodeSet) Dt() (ret NodeSet)
- func (p NodeSet) Dump() NodeSet
- func (p NodeSet) Element__0(elemType atom.Atom) (ret NodeSet)
- func (p NodeSet) Element__1(elemType string) (ret NodeSet)
- func (p NodeSet) ExactText__0() (text string, err error)
- func (p NodeSet) ExactText__1(exactlyOne bool) (text string, err error)
- func (p NodeSet) FirstChild(nodeType html.NodeType) (ret NodeSet)
- func (p NodeSet) FirstElementChild() (ret NodeSet)
- func (p NodeSet) FirstTextChild() (ret NodeSet)
- func (p NodeSet) ForEach(callback func(node NodeSet))
- func (p NodeSet) Gop_Enum(callback func(node NodeSet))
- func (p NodeSet) H1() (ret NodeSet)
- func (p NodeSet) H2() (ret NodeSet)
- func (p NodeSet) H3() (ret NodeSet)
- func (p NodeSet) H4() (ret NodeSet)
- func (p NodeSet) HasAttr(k string, exactlyOne ...bool) bool
- func (p NodeSet) HrefVal__0() (text string, err error)
- func (p NodeSet) HrefVal__1(exactlyOne bool) (text string, err error)
- func (p NodeSet) Href__0() (text string, err error)
- func (p NodeSet) Href__1(v string) (ret NodeSet)
- func (p NodeSet) Href__2(exactlyOne bool) (text string, err error)
- func (p NodeSet) Id(v string) (ret NodeSet)
- func (p NodeSet) Img() (ret NodeSet)
- func (p NodeSet) Int__0() (v int, err error)
- func (p NodeSet) Int__1(exactlyOne bool) (v int, err error)
- func (p NodeSet) LastChild(nodeType html.NodeType) (ret NodeSet)
- func (p NodeSet) LastElementChild() (ret NodeSet)
- func (p NodeSet) LastTextChild() (ret NodeSet)
- func (p NodeSet) Li() (ret NodeSet)
- func (p NodeSet) Match(filter func(node *html.Node) bool) (ret NodeSet)
- func (p NodeSet) Nav() (ret NodeSet)
- func (p NodeSet) NextSibling(delta int) (ret NodeSet)
- func (p NodeSet) NextSiblings() (ret NodeSet)
- func (p NodeSet) Ok() bool
- func (p NodeSet) Ol() (ret NodeSet)
- func (p NodeSet) One() (ret NodeSet)
- func (p NodeSet) P() (ret NodeSet)
- func (p NodeSet) Parent() (ret NodeSet)
- func (p NodeSet) ParentN(level int) (ret NodeSet)
- func (p NodeSet) PrevSibling(delta int) (ret NodeSet)
- func (p NodeSet) PrevSiblings() (ret NodeSet)
- func (p NodeSet) Printf(w io.Writer, format string, params ...any) NodeSet
- func (p NodeSet) Render(w io.Writer, suffix ...string) (err error)
- func (p NodeSet) ScanInt(format string, exactlyOne ...bool) (v int, err error)
- func (p NodeSet) Span() (ret NodeSet)
- func (p NodeSet) Td() (ret NodeSet)
- func (p NodeSet) TextContains(text string) (ret NodeSet)
- func (p NodeSet) TextEqual(text string) (ret NodeSet)
- func (p NodeSet) TextHasPrefix(text string) (ret NodeSet)
- func (p NodeSet) Text__0() (text string, err error)
- func (p NodeSet) Text__1(exactlyOne bool) (text string, err error)
- func (p NodeSet) Ul() (ret NodeSet)
- func (p NodeSet) UnitedFloat__0() (v float64, err error)
- func (p NodeSet) UnitedFloat__1(exactlyOne bool) (v float64, err error)
Constants ¶
const (
GopPackage = true // to indicate this is a Go+ package
)
Variables ¶
var ( ErrNotFound = errors.New("entity not found") ErrBreak = errors.New("break") ErrTooManyNodes = errors.New("too many nodes") ErrInvalidNode = errors.New("invalid node") // ErrEmptyText represents an `empty text` error. ErrEmptyText = errors.New("empty text") // ErrInvalidScanFormat represents an `invalid fmt.Scan format` error. ErrInvalidScanFormat = errors.New("invalid fmt.Scan format") )
Functions ¶
This section is empty.
Types ¶
type NodeSet ¶
NodeSet represents a set of nodes.
func (NodeSet) AttrVal ¶
AttrVal returns attribute value of NodeSet. exactlyOne=false: if NodeSet is more than one, returns first node's attribute value.
func (NodeSet) Attribute__0 ¶ added in v0.8.2
Attribute returns NodeSet which the value of attribute `k` is `v`.
func (NodeSet) Attribute__1 ¶ added in v0.8.2
func (NodeSet) ChildEqualText ¶
ChildEqualText returns NodeSet which child node text equals `text`.
func (NodeSet) ChildrenAsText ¶
func (NodeSet) CollectOne__0 ¶ added in v0.7.1
CollectOne returns the first node.
func (NodeSet) CollectOne__1 ¶ added in v0.7.1
CollectOne returns the first node. If `exactly` is true, it will return an error if there are more than one node.
func (NodeSet) ContainsClass ¶
ContainsClass returns NodeSet which class contains `v`.
func (NodeSet) Div ¶
Div returns NodeSet which node type is ElementNode and it's element type is `div`.
func (NodeSet) Dl ¶ added in v0.8.0
Dl returns NodeSet which node type is ElementNode and it's element type is `dl`.
func (NodeSet) Dt ¶ added in v0.8.0
Dt returns NodeSet which node type is ElementNode and it's element type is `dt`.
func (NodeSet) Element__0 ¶ added in v0.8.2
Element returns NodeSet which node type is ElementNode and it's element type is `elemType`.
func (NodeSet) Element__1 ¶ added in v0.8.2
Element returns NodeSet which node type is ElementNode and it's element type is `elemType`.
func (NodeSet) ExactText__0 ¶ added in v0.7.1
func (NodeSet) ExactText__1 ¶ added in v0.7.1
ExactText returns text of NodeSet. exactlyOne=false: if NodeSet is more than one, returns first node's text (if node type is not TextNode, return error).
func (NodeSet) FirstElementChild ¶
func (NodeSet) FirstTextChild ¶
func (NodeSet) H1 ¶
H1 returns NodeSet which node type is ElementNode and it's element type is `h1`.
func (NodeSet) H2 ¶
H2 returns NodeSet which node type is ElementNode and it's element type is `h2`.
func (NodeSet) H3 ¶
H3 returns NodeSet which node type is ElementNode and it's element type is `h3`.
func (NodeSet) H4 ¶
H4 returns NodeSet which node type is ElementNode and it's element type is `h4`.
func (NodeSet) HrefVal__0 ¶ added in v0.7.1
func (NodeSet) HrefVal__1 ¶ added in v0.7.1
HrefVal returns href attribute's value of NodeSet. exactlyOne=false: if NodeSet is more than one, returns first node's attribute value.
func (NodeSet) Img ¶
Img returns NodeSet which node type is ElementNode and it's element type is `img`.
func (NodeSet) Int__1 ¶ added in v0.7.1
Int returns int value of p.Text(). exactlyOne=false: if NodeSet is more than one, returns first node's value.
func (NodeSet) LastElementChild ¶
func (NodeSet) LastTextChild ¶
func (NodeSet) Li ¶
Li returns NodeSet which node type is ElementNode and it's element type is `li`.
func (NodeSet) Nav ¶
Nav returns NodeSet which node type is ElementNode and it's element type is `nav`.
func (NodeSet) NextSibling ¶
func (NodeSet) NextSiblings ¶
func (NodeSet) Ol ¶
Ol returns NodeSet which node type is ElementNode and it's element type is `ol`.
func (NodeSet) PrevSibling ¶
func (NodeSet) PrevSiblings ¶
func (NodeSet) ScanInt ¶
ScanInt returns int value of p.Text(). exactlyOne=false: if NodeSet is more than one, returns first node's value.
func (NodeSet) Span ¶
Span returns NodeSet which node type is ElementNode and it's element type is `span`.
func (NodeSet) Td ¶
Td returns NodeSet which node type is ElementNode and it's element type is `td`.
func (NodeSet) TextContains ¶
TextContains returns NodeSet which node type is TextNode and it's text contains `text`.
func (NodeSet) TextEqual ¶
TextEqual returns NodeSet which node type is TextNode and it's text equals `text`.
func (NodeSet) TextHasPrefix ¶
TextHasPrefix returns NodeSet which node type is TextNode and its prefix is `text`.
func (NodeSet) Text__1 ¶ added in v0.7.1
Text returns text of NodeSet. exactlyOne=false: if NodeSet is more than one, returns first node's text.
func (NodeSet) Ul ¶
Ul returns NodeSet which node type is ElementNode and it's element type is `ul`.
func (NodeSet) UnitedFloat__0 ¶ added in v0.7.1
Directories
¶
Path | Synopsis |
---|---|
chore
|
|
gopkgimps
command
|
|
gostdpkgs
command
|
|
hreflinks
command
|
|
pysigfetch
command
|
|
stdpkgprogress
command
|
|
cmd
|
|
hdq
command
|
|
hdq/internal/base
Package base defines shared basic pieces of the hdq command, in particular logging and the Command structure.
|
Package base defines shared basic pieces of the hdq command, in particular logging and the Command structure. |
hdq/internal/fetch
Package fetch implements the "hdq fetch" command.
|
Package fetch implements the "hdq fetch" command. |
hdq/internal/help
Package help implements the "hdq help” command.
|
Package help implements the "hdq help” command. |
tutorial
|
|
01-Links
command
|
|