utils

package
v0.0.0-...-9fc07fa Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2025 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloneNode

func CloneNode(node *html.Node) *html.Node

func DropTag

func DropTag(node *html.Node)

func GetLongestCommonSubString

func GetLongestCommonSubString(str1, str2 string) string

func GetNodeClass

func GetNodeClass(node *html.Node) string

func GetNodeClassList

func GetNodeClassList(node *html.Node) []string

func GetNodeHash

func GetNodeHash(node *html.Node) string

func GetNodeHtml

func GetNodeHtml(node *html.Node) (string, error)

func GetNodeRootTree

func GetNodeRootTree(node *html.Node) string

func GetNodeText

func GetNodeText(node *html.Node) string

func GetNodeTextByXPath

func GetNodeTextByXPath(node *html.Node, xpath string) string

func GetNodesText

func GetNodesText(nodes []*html.Node) []string

func GetNodesTextByXPath

func GetNodesTextByXPath(nodes []*html.Node, xpath string) string

func NormalizeNode

func NormalizeNode(node *html.Node)

func PadHostForImages

func PadHostForImages(host, url string) string

func RemoveNode

func RemoveNode(node *html.Node)

func RemoveNoiseNode

func RemoveNoiseNode(node *html.Node, noiseNodeList []string)

func StripNodes

func StripNodes(root *html.Node, tagNamesMap map[string]bool)

func StripTags

func StripTags(root *html.Node, tag string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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