extractor

package
v0.0.0-...-b306109 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultYPURL = "https://www.yellowpages.com/search"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Extractor

type Extractor interface {
	FetchNextPage(addFunc func([]model.Contact)) (bool, error)
}

Extractor defines the protocol for extracting information from yellowpages. When record is fetched, the supplied addFunc is called.

type YellowPages

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

func NewYPExtractor

func NewYPExtractor(searchTerms, geoLocationTerms string) *YellowPages

NewYPExtractor creates new instance of page extractor, by supplying search terms and geo location terms

func (*YellowPages) FetchNextPage

func (this *YellowPages) FetchNextPage(addFunc func([]model.Contact)) (bool, error)

Jump to

Keyboard shortcuts

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