content

package
v0.0.0-...-0770d63 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CallbackFunc

type CallbackFunc func(*html.Node)

CallbackFunc represents a function that operates on an HTML node.

type Event

type Event struct {
	// contains filtered or unexported fields
}

Event represents an event to be triggered on a specific HTML node type.

func NewEvent

func NewEvent(nodeType html.NodeType, callbackFunc CallbackFunc) Event

NewEvent creates a new Event with the specified node type and callback function.

type Extractor

type Extractor interface {
	Extract(events ...Event)
}

Extractor defines the interface for extracting content based on provided events.

func NewExtractor

func NewExtractor(root *html.Node) Extractor

NewExtractor creates a new instance of the Extractor.

type Reader

type Reader interface {
	Read() (*html.Node, error)
}

Reader defines an interface for reading HTML content.

func NewReaderWithFile

func NewReaderWithFile(filename string) Reader

NewReaderWithFile creates a new instance of ReaderWithFile.

func NewReaderWithUrl

func NewReaderWithUrl(url string) Reader

NewReaderWithUrl creates a new instance of ReaderWithUrl with the specified URL.

Jump to

Keyboard shortcuts

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