crawler

package
v0.0.0-...-56d2e95 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetProductPages

func GetProductPages(url string) (int, error)

Types

type Article

type Article struct {
	Name            string `json:"name"`
	URL             string `json:"url"`
	CategoryName    string `json:"category"`
	CategoryURL     string `json:"category_url"`
	SubCategoryName string `json:"subcategory"`
	SubCategoryURL  string `json:"subcategory_url"`
	MenuName        string `json:"menu"`
	MenuURL         string `json:"menu_url"`
	Platform        string `json:"platform"`
	Price           int    `json:"price"`
	CurrentPrice    int    `json:"currentPrice"`
	Discount        int    `json:"discount"`
	Stock           int    `json:"stock"`
}

func Crawler

func Crawler(linksFilePath string) ([]Article, error)

func GetProduct

func GetProduct(url string) ([]Article, error)

type ArticleSelector

type ArticleSelector struct {
	Name         string
	Price        string
	CurrentPrice string
	URL          string
	ImageURL     string
	Stock        string
}

Jump to

Keyboard shortcuts

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