crawler

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2024 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Crawler

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

func New

func New(opts ...Option) *Crawler

func (*Crawler) Metrics added in v0.2.0

func (c *Crawler) Metrics() map[string]int64

func (*Crawler) OnReponse

func (c *Crawler) OnReponse(fn func(*wbot.Response))

func (*Crawler) Run added in v0.2.0

func (c *Crawler) Run(links ...string) error

func (*Crawler) Shutdown added in v0.2.0

func (c *Crawler) Shutdown()

type Option

type Option func(c *Crawler)

func WithFetcher

func WithFetcher(fetcher wbot.Fetcher) Option

func WithFilter

func WithFilter(rules ...*wbot.FilterRule) Option

func WithLogLevel added in v0.2.0

func WithLogLevel(level zerolog.Level) Option

func WithMaxDepth

func WithMaxDepth(maxDepth int32) Option

func WithParallel

func WithParallel(parallel int) Option

func WithProxies

func WithProxies(proxies []string) Option

func WithQueue added in v0.2.0

func WithQueue(queue wbot.Queue) Option

func WithRateLimit

func WithRateLimit(rates ...*wbot.RateLimit) Option

func WithStore

func WithStore(store wbot.Store) Option

func WithUserAgents

func WithUserAgents(userAgents []string) Option

Jump to

Keyboard shortcuts

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