Documentation ¶
Index ¶
- Constants
- Variables
- func NextStartToken(z *html.Tokenizer, skipErrors bool, htmlAtoms ...atom.Atom) (html.Token, error)
- func NextTextToken(z *html.Tokenizer, skipErrors bool, htmlAtoms ...atom.Atom) (html.Token, error)
- func NextTokenMatch(z *html.Tokenizer, skipErrors, includeChain, includeMatch bool, ...) ([]html.Token, error)
- func ParseLink(tokens ...html.Token) (href string, desc string, err error)
- func TokenAttribute(token html.Token, attrName string) (string, error)
- func TokensBetween(z *html.Tokenizer, skipErrors, inclusive bool, begin, end TokenFilters) ([]html.Token, error)
- func TokensBetweenAtom(z *html.Tokenizer, skipErrors, inclusive bool, htmlAtom atom.Atom) ([]html.Token, error)
- type AtomSet
- type Attributes
- type TokenFilter
- type TokenFilters
- type Tokens
Constants ¶
View Source
const (
AttrHref = "href"
)
Variables ¶
View Source
var TokenNotFound = errors.New("token not found")
Functions ¶
func NextStartToken ¶
func NextTextToken ¶
func NextTokenMatch ¶
func NextTokenMatch(z *html.Tokenizer, skipErrors, includeChain, includeMatch bool, filters ...TokenFilter) ([]html.Token, error)
NextTokenMatch returns a string of matches. `includeMatch` is only used when `includeChain` is included.
func TokenAttribute ¶ added in v0.28.3
func TokensBetween ¶
Types ¶
type AtomSet ¶
func NewAtomSet ¶
type Attributes ¶
type TokenFilter ¶
find next <tr> or </table>
type TokenFilters ¶
type TokenFilters []TokenFilter
func (TokenFilters) ByTokenType ¶
func (filters TokenFilters) ByTokenType(tt html.TokenType) []TokenFilter
Click to show internal directories.
Click to hide internal directories.