htmlquery

package module
v0.0.0-...-82f96e9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 6, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrValueCannotAddress  = errors.New("value can not address")
	ErrValueNotBasicKind   = errors.New("value not a basic kind")
	ErrValueCast           = errors.New("value string cast error")
	ErrValueKindNotSupport = errors.New("value kind not support")
)

Functions

func BindSelection

func BindSelection(sel *goquery.Selection, out any, options ...Options) error

Types

type Options

type Options struct {
	FindTag   string // "find"
	FormatTag string // "format"
}

type ProcessType

type ProcessType = func(resp *http.Response, body io.ReadCloser) error

func HtmlQuery

func HtmlQuery(process func(s *goquery.Selection) error) ProcessType

func Struct

func Struct(out any, find string, options ...Options) ProcessType

Struct 将HTML解析为Struct

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL