tracker

package
v0.0.0-...-6e60df0 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckUrlExist

func CheckUrlExist(url string) (int64, error)

check item with the supplied url exist or not if exist, return it's id

func InsertUrl

func InsertUrl(url *url.URL) (id int64, err error)

insert product url, if product already exist, return it's id

func RunWithTimeOut

func RunWithTimeOut(ctx *context.Context, timeout time.Duration, tasks chromedp.Tasks) chromedp.ActionFunc

func Scrape

func Scrape()

main scrape function

func ScrapeHtml

func ScrapeHtml(url string, selector map[string]string)

scrape HTML using colly (not finished)

Types

type ScrapeData

type ScrapeData struct {
	Name               string
	Sku                string
	OriginalPrice      int
	DiscountPrice      int
	DiscountPercentage int
}

func ScrapeJsSite

func ScrapeJsSite(url string, selector map[string]string) (ScrapeData, error)

scrape js site using chromedp

Directories

Path Synopsis
repo

Jump to

Keyboard shortcuts

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