selector

package
v1.9.1 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Discard

func Discard(n *html.Node) bool

`.//div[@id="wm-ipp-base" or @id="wm-ipp"]`

func FastDate

func FastDate(n *html.Node) bool

..//footer | .//small | //*[self::div or self::h2 or self::h3 or self::h4 or self::li or self::p or self::span or self::time or self::ul], then date selector.

func FreeText

func FreeText(n *html.Node) bool

.//*[(self::div or self::li or self::p or self::span)]/text()

func Query

func Query(root *html.Node, selector Rule) *html.Node

Query find the first element that matched with the rule.

func QueryAll

func QueryAll(root *html.Node, selector Rule) []*html.Node

QueryAll find all elements that matched with the rule.

func QueryAllTextNodes

func QueryAllTextNodes(root *html.Node, selector Rule) []*html.Node

QueryAllTextNodes find all text nodes that exist inside elements that matched with the rule.

func SlowDate

func SlowDate(n *html.Node) bool

`.//footer | .//small | //*`, then date selector.

Types

type Rule

type Rule func(*html.Node) bool

Jump to

Keyboard shortcuts

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