lilly

package
v0.0.0-...-c4bc1fe Latest Latest
Warning

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

Go to latest
Published: May 17, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action func(node *Node)

type DOMTree

type DOMTree struct {
	RootNode *Node

	ContentNode   *Node
	ThresholdNode *Node
}

func NewDOMTree

func NewDOMTree(root *html.Node) *DOMTree

func NewDOMTreeFromURL

func NewDOMTreeFromURL(url string) *DOMTree

func (*DOMTree) ExtractAccurateContent

func (_DOMTree *DOMTree) ExtractAccurateContent() (content string)

func (*DOMTree) ExtractContent

func (_DOMTree *DOMTree) ExtractContent() (content string)

func (*DOMTree) NewRootNode

func (_DOMTree *DOMTree) NewRootNode(root *html.Node) *Node

type Node

type Node struct {
	*html.Node
	DOMTree *DOMTree

	Parent   *Node
	Children []*Node

	TagCount             float64
	LinkTagCount         float64
	CharacterCount       float64
	LinkCharacterCount   float64
	TextDensity          float64
	CompositeTextDensity float64
	CompositeDensitySum  float64
}

func (*Node) Traversal

func (node *Node) Traversal(action Action)

Jump to

Keyboard shortcuts

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