Documentation ¶
Overview ¶
Package bartender is a service to make web crawlers consume webpages easier
Index ¶
- Variables
- type Bartender
- func (b *Bartender) AutoFree(interval time.Duration)
- func (b *Bartender) BlockRequests(patterns ...string)
- func (b *Bartender) BypassUserAgentNames(list ...string)
- func (b *Bartender) MaxWait(d time.Duration)
- func (b *Bartender) RenderPage(w http.ResponseWriter, r *http.Request) bool
- func (b *Bartender) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (b *Bartender) WarmUp()
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Bartender ¶
type Bartender struct {
// contains filtered or unexported fields
}
func (*Bartender) AutoFree ¶ added in v0.2.0
AutoFree automatically closes the each headless browser after a period of time. It prevent the memory leak of the headless browser.
func (*Bartender) BlockRequests ¶ added in v0.0.9
func (*Bartender) BypassUserAgentNames ¶ added in v0.0.7
func (*Bartender) MaxWait ¶ added in v0.0.8
MaxWait sets the max wait time for the headless browser to render the page. If the max wait time is reached, bartender will stop waiting for page rendering and immediately return the current html.
func (*Bartender) RenderPage ¶
RenderPage returns true if the page is rendered by the headless browser.
Click to show internal directories.
Click to hide internal directories.