htmlUtil

package
v0.0.0-...-6986f26 Latest Latest
Warning

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

Go to latest
Published: May 8, 2020 License: BSD-2-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Currency

func Currency(node *html.Node, f func(*html.Node) error) error

func GetAbsDirectory

func GetAbsDirectory(u *url.URL) string

func GetAbsUrl

func GetAbsUrl(curUrl *url.URL, relativeUrl string) (res *url.URL, err error)

func GetAttr

func GetAttr(node *html.Node, key string) *html.Attribute

func GetFileNameFromRaw

func GetFileNameFromRaw(u string) string

func GetFormatNodeStr

func GetFormatNodeStr(node *html.Node) (res string, err error)

过滤有用的节点

func GetHtmlPlainTextFromPath

func GetHtmlPlainTextFromPath(filename string) (string, error)

func GetUrl

func GetUrl(node *html.Node, root *url.URL) *url.URL

func GetWords

func GetWords(node *html.Node) (res string, err error)

只获取文本内容

func SaveDocument

func SaveDocument(doc *html.Node, fileName string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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