scraper

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2017 License: Apache-2.0 Imports: 19 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAsset

func NewAsset(url string) *asset

func NewImage

func NewImage(url string) *image

func NewIndex

func NewIndex(url string) *index

func NewScript

func NewScript(url string) *script

func NewStylesheet

func NewStylesheet(url string) *stylesheet

Types

type Resource

type Resource interface {
	Url() string
	Transform(scraper *Scraper, srcUrl *url.URL, reader io.Reader) (io.Reader, error)
}

type Scraper

type Scraper struct {
	SnapshotDir string
	Log         *zap.Logger
	Id          string
	// contains filtered or unexported fields
}

func NewScraper

func NewScraper(ctx context.Context, logger *zap.Logger, id, seed string) *Scraper

func (*Scraper) Cleanup

func (s *Scraper) Cleanup() error

func (*Scraper) Scrape

func (s *Scraper) Scrape() error

Jump to

Keyboard shortcuts

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