Documentation
¶
Index ¶
Constants ¶
View Source
const ( FromURL string = "url" FromElement string = "element" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BrowserExtractor ¶
type BrowserExtractor struct { Config ExtractorConfig Browser *rod.Browser }
func NewBrowserExtractor ¶
func NewBrowserExtractor(config ExtractorConfig) *BrowserExtractor
func (*BrowserExtractor) Extract ¶
func (e *BrowserExtractor) Extract(url string) (*ExtractionResult, error)
func (*BrowserExtractor) ExtractWithoutCache ¶
func (e *BrowserExtractor) ExtractWithoutCache(url string) (*ExtractionResult, error)
type ExtractedItem ¶
type ExtractedItem map[string]interface{}
type ExtractionError ¶
type ExtractionResult ¶
type ExtractionResult struct { SchemaResults map[string]SchemaResult Errors []ExtractionError FinalURL string }
type Extractor ¶
type Extractor interface { Extract(url string) (*ExtractionResult, error) ExtractWithoutCache(url string) (*ExtractionResult, error) }
func NewExtractor ¶
func NewExtractor(config ExtractorConfig) Extractor
type ExtractorConfig ¶
type SchemaInfo ¶
type SchemaResult ¶
type SchemaResult struct { Schema SchemaInfo Items []ExtractedItem }
type StaticExtractor ¶
type StaticExtractor struct {
Config ExtractorConfig
}
func NewStaticExtractor ¶
func NewStaticExtractor(config ExtractorConfig) *StaticExtractor
func (*StaticExtractor) Extract ¶
func (e *StaticExtractor) Extract(url string) (*ExtractionResult, error)
func (*StaticExtractor) ExtractWithoutCache ¶
func (e *StaticExtractor) ExtractWithoutCache(url string) (*ExtractionResult, error)
Click to show internal directories.
Click to hide internal directories.