fetcher

package
v0.0.0-...-15ffb35 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatPrice

func FormatPrice(s string) string

FormatPrice formats price

func GetMarketName

func GetMarketName(doc *goquery.Document) string

GetMarketName returns the document's market name

func RegisterFetcher

func RegisterFetcher(f Fetcher)

RegisterFetcher registers a fetcher

Types

type Fetcher

type Fetcher interface {
	// IsMarket returns whether the fetcher supports the document
	IsMarket(doc *goquery.Document) bool
	// Fetch parses the document and returns a parsed Stock model
	Fetch(doc *goquery.Document, symbol string) (*model.Stock, error)
}

func SelectFetcher

func SelectFetcher(doc *goquery.Document) Fetcher

SelectFetcher returns fetcher that can parse the document

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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