Documentation
¶
Index ¶
- func FetchReviewsWithFallback(ctx context.Context, params fetchReviewsParams) (FetchReviewsResponse, []DOMReview, error)
- type About
- type Address
- type DOMReview
- type EmailExtractJob
- type EmailExtractJobOptions
- type Entry
- type EntryWithDistance
- type FetchReviewsResponse
- type GmapJob
- type GmapJobOptions
- type Image
- type LinkSource
- type MapLocation
- type MapSearchParams
- type Option
- type Owner
- type PlaceJob
- type PlaceJobOptions
- type Review
- type SearchJob
- type SearchJobOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FetchReviewsWithFallback ¶ added in v1.9.0
func FetchReviewsWithFallback(ctx context.Context, params fetchReviewsParams) (FetchReviewsResponse, []DOMReview, error)
FetchReviewsWithFallback attempts RPC-based extraction first, then falls back to DOM
Types ¶
type DOMReview ¶ added in v1.9.0
type DOMReview struct {
AuthorName string
AuthorURL string
ProfilePicture string
Rating int
RelativeTimeDescription string
Text string
Images []string
}
DOMReview represents a review extracted from the DOM
type EmailExtractJob ¶ added in v1.1.0
type EmailExtractJob struct {
scrapemate.Job
Entry *Entry
ExitMonitor exiter.Exiter
}
func NewEmailJob ¶ added in v1.1.0
func NewEmailJob(parentID string, entry *Entry, opts ...EmailExtractJobOptions) *EmailExtractJob
func (*EmailExtractJob) Process ¶ added in v1.1.0
func (j *EmailExtractJob) Process(ctx context.Context, resp *scrapemate.Response) (any, []scrapemate.IJob, error)
func (*EmailExtractJob) ProcessOnFetchError ¶ added in v1.1.0
func (j *EmailExtractJob) ProcessOnFetchError() bool
type EmailExtractJobOptions ¶ added in v1.5.2
type EmailExtractJobOptions func(*EmailExtractJob)
func WithEmailJobExitMonitor ¶ added in v1.5.2
func WithEmailJobExitMonitor(exitMonitor exiter.Exiter) EmailExtractJobOptions
type Entry ¶
type Entry struct {
ID string `json:"input_id"`
Link string `json:"link"`
Cid string `json:"cid"`
Title string `json:"title"`
Categories []string `json:"categories"`
Category string `json:"category"`
Address string `json:"address"`
OpenHours map[string][]string `json:"open_hours"`
// PopularTImes is a map with keys the days of the week
// and value is a map with key the hour and value the traffic in that time
PopularTimes map[string]map[int]int `json:"popular_times"`
WebSite string `json:"web_site"`
Phone string `json:"phone"`
PlusCode string `json:"plus_code"`
ReviewCount int `json:"review_count"`
ReviewRating float64 `json:"review_rating"`
ReviewsPerRating map[int]int `json:"reviews_per_rating"`
Latitude float64 `json:"latitude"`
Longtitude float64 `json:"longtitude"`
Status string `json:"status"`
Description string `json:"description"`
ReviewsLink string `json:"reviews_link"`
Thumbnail string `json:"thumbnail"`
Timezone string `json:"timezone"`
PriceRange string `json:"price_range"`
DataID string `json:"data_id"`
PlaceID string `json:"place_id"`
Images []Image `json:"images"`
Reservations []LinkSource `json:"reservations"`
OrderOnline []LinkSource `json:"order_online"`
Menu LinkSource `json:"menu"`
Owner Owner `json:"owner"`
CompleteAddress Address `json:"complete_address"`
About []About `json:"about"`
UserReviews []Review `json:"user_reviews"`
UserReviewsExtended []Review `json:"user_reviews_extended"`
Emails []string `json:"emails"`
}
func EntryFromJSON ¶ added in v1.0.0
func ParseSearchResults ¶ added in v1.6.1
func (*Entry) AddExtraReviews ¶ added in v1.8.0
func (*Entry) CsvHeaders ¶
func (*Entry) IsWebsiteValidForEmail ¶ added in v1.1.0
type EntryWithDistance ¶ added in v1.6.1
type FetchReviewsResponse ¶ added in v1.9.0
type FetchReviewsResponse struct {
// contains filtered or unexported fields
}
type GmapJob ¶
type GmapJob struct {
scrapemate.Job
MaxDepth int
LangCode string
ExtractEmail bool
Deduper deduper.Deduper
ExitMonitor exiter.Exiter
ExtractExtraReviews bool
}
func NewGmapJob ¶
func (*GmapJob) BrowserActions ¶
func (j *GmapJob) BrowserActions(ctx context.Context, page scrapemate.BrowserPage) scrapemate.Response
func (*GmapJob) Process ¶
func (j *GmapJob) Process(ctx context.Context, resp *scrapemate.Response) (any, []scrapemate.IJob, error)
func (*GmapJob) UseInResults ¶
type GmapJobOptions ¶ added in v1.5.2
type GmapJobOptions func(*GmapJob)
func WithDeduper ¶ added in v1.5.2
func WithDeduper(d deduper.Deduper) GmapJobOptions
func WithExitMonitor ¶ added in v1.5.2
func WithExitMonitor(e exiter.Exiter) GmapJobOptions
func WithExtraReviews ¶ added in v1.8.0
func WithExtraReviews() GmapJobOptions
type LinkSource ¶ added in v1.0.0
type MapLocation ¶ added in v1.6.1
type MapSearchParams ¶ added in v1.6.1
type MapSearchParams struct {
Location MapLocation
Query string
ViewportW int
ViewportH int
Hl string
}
type PlaceJob ¶
type PlaceJob struct {
scrapemate.Job
UsageInResultststs bool
ExtractEmail bool
ExitMonitor exiter.Exiter
ExtractExtraReviews bool
}
func NewPlaceJob ¶
func NewPlaceJob(parentID, langCode, u string, extractEmail, extraExtraReviews bool, opts ...PlaceJobOptions) *PlaceJob
func (*PlaceJob) BrowserActions ¶
func (j *PlaceJob) BrowserActions(ctx context.Context, page scrapemate.BrowserPage) scrapemate.Response
func (*PlaceJob) Process ¶
func (j *PlaceJob) Process(_ context.Context, resp *scrapemate.Response) (any, []scrapemate.IJob, error)
func (*PlaceJob) UseInResults ¶ added in v1.1.0
type PlaceJobOptions ¶ added in v1.5.2
type PlaceJobOptions func(*PlaceJob)
func WithPlaceJobExitMonitor ¶ added in v1.5.2
func WithPlaceJobExitMonitor(exitMonitor exiter.Exiter) PlaceJobOptions
type Review ¶ added in v1.0.0
type Review struct {
Name string
ProfilePicture string
Rating int
Description string
Images []string
When string
}
func ConvertDOMReviewsToReviews ¶ added in v1.9.0
ConvertDOMReviewsToReviews converts DOMReview slice to Review slice
type SearchJob ¶ added in v1.6.1
type SearchJob struct {
scrapemate.Job
ExitMonitor exiter.Exiter
// contains filtered or unexported fields
}
func NewSearchJob ¶ added in v1.6.1
func NewSearchJob(params *MapSearchParams, opts ...SearchJobOptions) *SearchJob
type SearchJobOptions ¶ added in v1.6.1
type SearchJobOptions func(*SearchJob)
func WithSearchJobExitMonitor ¶ added in v1.6.1
func WithSearchJobExitMonitor(exitMonitor exiter.Exiter) SearchJobOptions
Click to show internal directories.
Click to hide internal directories.