scrape

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2022 License: MIT Imports: 8 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCloudFlareRoundTripper

func GetCloudFlareRoundTripper() http.RoundTripper

func ScrapeDetails

func ScrapeDetails(options ScrapeDetailsOptions) map[string]string

func ScrapeList

func ScrapeList(schema *config.PageSchema, url string) config.ParsedLinks

func ScrapeListFlat

func ScrapeListFlat(schema *config.PageSchema, url string) []string

func SetVerbose

func SetVerbose(v bool)

func Verbose

func Verbose() bool

Types

type DetailsCollector

type DetailsCollector interface {
	// Collect(url string, data T) error
	CollectField(url string, field string, data interface{}) error
}

type MemoryDetailsCollector

type MemoryDetailsCollector struct {
	Items map[string]map[string]interface{}
	// contains filtered or unexported fields
}

func NewMemoryDetailsCollector

func NewMemoryDetailsCollector() *MemoryDetailsCollector

func (*MemoryDetailsCollector) CollectField

func (c *MemoryDetailsCollector) CollectField(url string, field string, data interface{}) error

type ScrapeDetailsOptions

type ScrapeDetailsOptions struct {
	Async            bool
	BatchSize        int
	URLs             []string
	Schema           *config.PageSchema
	DetailsCollector DetailsCollector
}

Jump to

Keyboard shortcuts

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