Skip to content

Commit

Permalink
fixes issue with postgres store
Browse files Browse the repository at this point in the history
  • Loading branch information
gosom committed Dec 12, 2023
1 parent b007662 commit d4f336c
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions gmaps/place.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import (
type PlaceJob struct {
scrapemate.Job

useInResults bool
extractEmail bool
UsageInResultststs bool
ExtractEmail bool
}

func NewPlaceJob(parentID, langCode, u string, extractEmail bool) *PlaceJob {
Expand All @@ -36,8 +36,8 @@ func NewPlaceJob(parentID, langCode, u string, extractEmail bool) *PlaceJob {
},
}

job.useInResults = true
job.extractEmail = extractEmail
job.UsageInResultststs = true
job.ExtractEmail = extractEmail

return &job
}
Expand All @@ -59,10 +59,10 @@ func (j *PlaceJob) Process(_ context.Context, resp *scrapemate.Response) (any, [
return nil, nil, err
}

if j.extractEmail && entry.IsWebsiteValidForEmail() {
if j.ExtractEmail && entry.IsWebsiteValidForEmail() {
emailJob := NewEmailJob(j.ID, &entry)

Check failure on line 63 in gmaps/place.go

View workflow job for this annotation

GitHub Actions / Build (>=1.20.0)

j.ID undefined (type *PlaceJob has no field or method ID) (typecheck)

j.useInResults = false
j.UsageInResultststs = false

return nil, []scrapemate.IJob{emailJob}, nil
}
Expand Down Expand Up @@ -137,7 +137,7 @@ func (j *PlaceJob) BrowserActions(_ context.Context, page playwright.Page) scrap
}

func (j *PlaceJob) UseInResults() bool {
return j.useInResults
return j.UsageInResultststs
}

const js = `
Expand Down

0 comments on commit d4f336c

Please sign in to comment.