hquery

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: May 7, 2023 License: Unlicense Imports: 4 Imported by: 0

Documentation

Overview

Package hquery provides tools to query a parsed HTML document with CSS selectors. It is a light-weight alternative to goquery.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindAll

func FindAll(sel string, n *html.Node) ([]*html.Node, error)

FindAll returns a slice of the nodes that match the selector, from n and its children.

func FindAttr

func FindAttr(attr string, n *html.Node) (string, bool)

FindAttr returns the attribute value of n.

func FindFirst

func FindFirst(sel string, n *html.Node) (*html.Node, error)

FindFirst returns the first node that matches the selector, from n and its children.

func NewForm

func NewForm(sel, selSubmit string, n *html.Node) (url.Values, error)

NewForm returns a pre-filled map from the selector. A specific submit can be specified can be specified in cases where there is more than one. If it is not specified, the first submit will be chosen.

Types

This section is empty.

Jump to

Keyboard shortcuts

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