extractor

package
v0.0.0-...-dad2dbc Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Doc

type Doc goquery.Document

type Extract

type Extract struct {
	MainSelection *goquery.Selection
	// contains filtered or unexported fields
}

func New

func New(doc document.Document, responseBody io.ReadCloser) *Extract

func (Extract) Image

func (e Extract) Image(sel Selection) string

func (Extract) NumPrice

func (e Extract) NumPrice(sel Selection) (float64, error)

func (Extract) Price

func (e Extract) Price(sel Selection) string

func (Extract) Title

func (e Extract) Title(sel Selection) string

func (Extract) URL

func (e Extract) URL(sel Selection) string

type Extractor

type Extractor interface {
	Title(sel Selection) string
	Price(sel Selection) string
	NumPrice(sel Selection) (error, float64)
	URL(sel Selection) string
	Image(sel Selection) string
}

type Selection

type Selection *goquery.Selection

Jump to

Keyboard shortcuts

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