scraper

package
v0.0.0-...-006b425 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLowestPriceProd

func GetLowestPriceProd(products []models.Product) (lowestPriceProd models.Product)

Returns the product with the lowest price in the slice of products

func Scraper

func Scraper(prod, baseUrl string) (Products []models.Product)

A scraper function that takes a url and a selector and returns a slice of Product structs and the lowestPriceProdfind in the sscraped site.

Types

type ProdSelector

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

func Selector

func Selector() ProdSelector

Export ProductSelector to be used like a constant, carrying the selectors of the website

Jump to

Keyboard shortcuts

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