scraper

package
v0.0.0-...-0206da9 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2022 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrFileName = errors.New("file name not found")
)

Functions

func ScanFile

func ScanFile(src string, conditions ...func(string)) error

Types

type Client

type Client interface {
	Scrape(symbol, filetype string) ([]*obj.Document, error)
}

type Config

type Config struct {
}

type Crawler

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

func NewCrawler

func NewCrawler(params CrawlerParams) (c *Crawler, err error)

func (*Crawler) Crawl

func (c *Crawler) Crawl(numWorkers uint8) error

func (*Crawler) SetApplicationFileHandler

func (c *Crawler) SetApplicationFileHandler(f ResponseHandler)

func (*Crawler) SetLogger

func (c *Crawler) SetLogger(l logger.Client)

func (*Crawler) SetTextFileHandler

func (c *Crawler) SetTextFileHandler(f ResponseHandler)

type CrawlerParams

type CrawlerParams struct {
	Limit uint64
	Seeds []string
}

type GParser

type GParser struct {
}

func (*GParser) Parse

func (p *GParser) Parse(b []byte) (d []*obj.Document, err error)

type GoogleClient

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

func NewGoogleClient

func NewGoogleClient() *GoogleClient

func (*GoogleClient) Scrape

func (g *GoogleClient) Scrape(symbol, ftype string) (d []*obj.Document, err error)

type ResponseHandler

type ResponseHandler func(*http.Response) error

Jump to

Keyboard shortcuts

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