Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var GoogleDomains = map[string]string{}/* 199 elements not displayed */
GoogleDomains maps language/country hints to Google TLD suffixes used for URL construction.
Functions ¶
func BuildImageURL ¶ added in v0.4.1
BuildImageURL builds a Google image search URL from Query fields. It returns an error when the resulting query text is empty or invalid.
Types ¶
type Google ¶
type Google struct {
core.Browser
core.SearchEngineOptions
// contains filtered or unexported fields
}
Google implements core.SearchEngine for Google SERP pages.
func New ¶
func New(browser core.Browser, opts core.SearchEngineOptions) *Google
New creates a Google engine instance with browser/runtime options applied.
func (*Google) GetRateLimiter ¶ added in v0.2.1
GetRateLimiter returns a limiter configured from SearchEngineOptions.
func (*Google) Search ¶
func (gogl *Google) Search(ctx context.Context, query core.Query) (results []core.SearchResult, err error)
Search executes a Google web search and returns normalized search results. It may return core.ErrCaptcha or core.ErrSearchTimeout.
func (*Google) SearchImage ¶ added in v0.4.1
SearchImage executes a Google image search and returns normalized image results. It may return core.ErrCaptcha or core.ErrSearchTimeout.