gmaps

package
v0.0.0-...-c703fab Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address struct {
	Street string `json:"street"`
	Number string `json:"number"`
}

type CEIDGExtractJob

type CEIDGExtractJob struct {
	scrapemate.Job
	Entry *Entry
}

func NewCEIDGJob

func NewCEIDGJob(entry *Entry) *CEIDGExtractJob

func (*CEIDGExtractJob) Process

func (j *CEIDGExtractJob) Process(ctx context.Context, resp *scrapemate.Response) (any, []scrapemate.IJob, error)

type EmailExtractJob

type EmailExtractJob struct {
	scrapemate.Job
	Entry *Entry
}

func NewEmailJob

func NewEmailJob(parentID string, entry *Entry) *EmailExtractJob

func (*EmailExtractJob) Process

func (j *EmailExtractJob) Process(ctx context.Context, resp *scrapemate.Response) (any, []scrapemate.IJob, error)

func (*EmailExtractJob) ProcessOnFetchError

func (j *EmailExtractJob) ProcessOnFetchError() bool

type Entry

type Entry struct {
	ID          string            `json:"input_id"`
	Link        string            `json:"link"`
	Title       string            `json:"title"`
	Address     Address           `json:"complete_address"`
	City        string            `json:"city"`
	WebSite     string            `json:"web_site"`
	Phone       string            `json:"phone"`
	Emails      []string          `json:"emails"`
	SocialLinks map[string]string `json:"social_links"` // Added JSON tag
	NIP         string            `json:"nip"`
	CEIDG       string            `json:"ceidg"`
}

func EntryFromJSON

func EntryFromJSON(raw []byte) (Entry, error)

func (*Entry) CsvHeaders

func (e *Entry) CsvHeaders() []string

func (*Entry) CsvRow

func (e *Entry) CsvRow() []string

func (*Entry) IsWebsiteValidForEmail

func (e *Entry) IsWebsiteValidForEmail() bool

type GmapJob

type GmapJob struct {
	scrapemate.Job

	MaxDepth     int
	LangCode     string
	ExtractEmail bool
}

func NewGmapJob

func NewGmapJob(id, langCode, query string, maxDepth int, extractEmail bool) *GmapJob

func (*GmapJob) BrowserActions

func (j *GmapJob) BrowserActions(ctx context.Context, page playwright.Page) scrapemate.Response

func (*GmapJob) Process

func (j *GmapJob) Process(ctx context.Context, resp *scrapemate.Response) (any, []scrapemate.IJob, error)

func (*GmapJob) UseInResults

func (j *GmapJob) UseInResults() bool

type PlaceJob

type PlaceJob struct {
	scrapemate.Job

	UsageInResultststs bool
	ExtractEmail       bool
}

func NewPlaceJob

func NewPlaceJob(parentID, langCode, u string, extractEmail bool) *PlaceJob

func (*PlaceJob) BrowserActions

func (j *PlaceJob) BrowserActions(_ context.Context, page playwright.Page) scrapemate.Response

func (*PlaceJob) Process

func (j *PlaceJob) Process(_ context.Context, resp *scrapemate.Response) (any, []scrapemate.IJob, error)

func (*PlaceJob) UseInResults

func (j *PlaceJob) UseInResults() bool

Jump to

Keyboard shortcuts

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