html

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HTML2Text

func HTML2Text(content string) (string, error)

HTML2Text get HTML as text

Types

type Meta

type Meta struct {
	Name     string
	Property string
	Content  string
}

Meta is a HTML meta tag

type MetaSet

type MetaSet map[string]*Meta

MetaSet is the set of meta tags

func ExtractMetaFromDOM

func ExtractMetaFromDOM(doc *html.Node) MetaSet

ExtractMetaFromDOM extracts meta tags from a HTML document.

func (MetaSet) GetContent

func (m MetaSet) GetContent(keys ...string) string

GetContent get first content form keys

Jump to

Keyboard shortcuts

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