crawl

package
v0.0.0-...-da513fb Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2019 License: MIT Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MatchMIMEInExts

func MatchMIMEInExts(MIME string, ftypes []string) (string, bool)

Types

type Crawler

type Crawler struct {
	Semaphore    chan bool
	URLTopoCh    chan *URLTopological
	Logger       *log.Logger
	Server       *headless.Server
	DownloadHTML bool
	// contains filtered or unexported fields
}

Crawler ...

func New

func New(config *conf.Configuration) *Crawler

New ...

func (*Crawler) Crawl

func (crawler *Crawler) Crawl(urlTopo *URLTopological)

Crawl ...

func (*Crawler) EnableCookie

func (crawler *Crawler) EnableCookie()

EnableCookie ...

func (*Crawler) SetProxy

func (crawler *Crawler) SetProxy(proxy func(*http.Request) (*url.URL, error))

SetProxy sets proxy for crawler

func (*Crawler) SetTimeout

func (crawler *Crawler) SetTimeout(duration time.Duration)

SetTimeout ...

type URLTopological

type URLTopological struct {
	URL   *url.URL
	Depth int
}

Jump to

Keyboard shortcuts

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