parser

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2022 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Attr

type Attr struct {
	Name  string
	Value string
}

type Config

type Config struct {
	Visit       []Visit
	Delay       int
	RandomDelay int
}

func ConfigFromJSON

func ConfigFromJSON(data []byte) (*Config, error)

type Get

type Get struct {
	Elem        string
	Strip       bool
	StripRegexp string
	To          To
}

type Parser

type Parser struct {
	Cfg *Config
}

func New

func New(cfg *Config) *Parser

func (*Parser) Run

func (p *Parser) Run() (*Result, error)

type Result

type Result struct {
	StartTime time.Time
	EndTime   time.Time
	Elapsed   time.Duration
	Items     []ResultItem
}

type ResultItem

type ResultItem struct {
	Name  string
	Value string
	Attrs []Attr
}

type To

type To struct {
	Name  string
	Attrs []Attr
}

type Visit

type Visit struct {
	URL string
	Get []Get
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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