Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildImageURL ¶
BuildImageURL builds a Bing image search URL from Query fields. It returns an error when the resulting query text is empty.
Types ¶
type Bing ¶
type Bing struct {
core.Browser
core.SearchEngineOptions
// contains filtered or unexported fields
}
Bing implements core.SearchEngine for Bing SERP pages.
func New ¶
func New(browser core.Browser, opts core.SearchEngineOptions) *Bing
New creates a Bing engine instance with browser/runtime options applied.
func (*Bing) GetRateLimiter ¶
GetRateLimiter returns a limiter configured from SearchEngineOptions.
func (*Bing) Search ¶
func (bing *Bing) Search(ctx context.Context, query core.Query) (results []core.SearchResult, err error)
Search executes a Bing web search and returns normalized search results. It may return core.ErrCaptcha or core.ErrSearchTimeout.
func (*Bing) SearchImage ¶
SearchImage executes a Bing image search and returns normalized image results. It may return core.ErrCaptcha or core.ErrSearchTimeout.
type BingImageData ¶
type BingImageData struct {
T string `json:"t"` // Title
Desc string `json:"desc"` // Description
IMGURL string `json:"imgurl"` // Original image URL
W int `json:"w"` // Width
H int `json:"h"` // Height
PURL string `json:"purl"` // Page URL
TURL string `json:"turl"` // Thumbnail URL
MURL string `json:"murl"` // Image URL
}
BingImageData represents metadata encoded in the image result `m` attribute.