crawler

package
v0.0.0-...-7f31ccb Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2023 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Link struct {
	From string
	To   string
}

type WebCrawler

type WebCrawler struct {
	DomainName   string
	MaxDepth     int
	MaxPages     int
	Spider       colly.Collector
	CrawlDelayIn time.Duration
	Links        []Link
	Visited      map[string]bool
	Count        int
}

func CreateWebCrawler

func CreateWebCrawler(webCrawlerOpts WebCrawlerOpts) *WebCrawler

func (*WebCrawler) Crawl

func (wc *WebCrawler) Crawl()

type WebCrawlerOpts

type WebCrawlerOpts struct {
	DomainName     string
	MaxDepth       int
	MaxPages       int
	CrawlDelay     time.Duration
	UserAgent      string
	MaxParallelism int
}

Jump to

Keyboard shortcuts

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