web

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2023 License: GPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrCorruptedImage is returned when an image type has been detected but the contents are unreadable.
	ErrCorruptedImage = errors.New("corrupted image")
)

Functions

This section is empty.

Types

type Config added in v1.2.0

type Config struct {
	AcceptLanguage string
	EnableImages   bool
}

type Parser

type Parser struct {
	UserAgent string
	Config    Config
}

Parser implements parsing of standard HTML web pages.

func (*Parser) Init

func (p *Parser) Init(_ context.Context) error

Init initializes this parser.

func (*Parser) Name

func (p *Parser) Name() string

Name returns the descriptive name of this parser.

func (*Parser) Parse

func (p *Parser) Parse(ctx context.Context, u *url.URL, referer *url.URL) (result parsers.ParseResult)

Parse analyzes a given URL.

Jump to

Keyboard shortcuts

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