Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrCaptcha = errors.New("Captcha detected")
View Source
var ErrSearchTimeout = errors.New("Timeout. Cannot find element on page")
Functions ¶
func InitLogger ¶
func InitLogger(isVerbose, isDebug bool)
Types ¶
type Browser ¶
type Browser struct {
BrowserOpts
// contains filtered or unexported fields
}
func NewBrowser ¶
func NewBrowser(opts BrowserOpts) (*Browser, error)
func (*Browser) IsInitialized ¶
Check whether browser instance is already created
type BrowserOpts ¶
type BrowserOpts struct {
IsHeadless bool // Use browser interface
IsLeakless bool // Force to kill browser
Timeout time.Duration // Timeout
LanguageCode string
WaitRequests bool // Wait requests to complete after navigation
LeavePageOpen bool // Leave pages and browser open
WaitLoadTime time.Duration // Time to wait till page loads
}
func (*BrowserOpts) Check ¶ added in v0.2.1
func (o *BrowserOpts) Check()
Initialize browser parameters with default values if they are not set
type Query ¶
type SearchEngine ¶
type SearchEngineOptions ¶ added in v0.2.1
type SearchEngineOptions struct {
RateRequests int `mapstructure:"rate_requests"`
RateTime int64 `mapstructure:"rate_seconds"`
RateBurst int `mapstructure:"rate_burst"`
SelectorTimeout int64 `mapstructure:"selector_timeout"` // CSS selector timeout in seconds
}
func (*SearchEngineOptions) GetRatelimit ¶ added in v0.2.1
func (o *SearchEngineOptions) GetRatelimit() time.Duration
func (*SearchEngineOptions) GetSelectorTimeout ¶ added in v0.2.1
func (o *SearchEngineOptions) GetSelectorTimeout() time.Duration
func (*SearchEngineOptions) Init ¶ added in v0.2.1
func (o *SearchEngineOptions) Init()
type SearchResult ¶
Click to show internal directories.
Click to hide internal directories.