Documentation ¶
Index ¶
- Constants
- type GoSpider
- func (this *GoSpider) AddHeader(name, val string) *GoSpider
- func (this *GoSpider) AddURLRule(rule string) *GoSpider
- func (this *GoSpider) Charset(charset string) *GoSpider
- func (this *GoSpider) Close() error
- func (this *GoSpider) DataPath(queueDataPath string) *GoSpider
- func (this *GoSpider) Depth(depth int) *GoSpider
- func (this *GoSpider) OnVisit(rule string, f VisitCallback)
- func (this *GoSpider) OnVisited(f VisitedCallback)
- func (this *GoSpider) Proxy(proxy string) *GoSpider
- func (this *GoSpider) Run()
- func (this *GoSpider) RunCount() int64
- func (this *GoSpider) Size() int
- func (this *GoSpider) Sleep(sleep time.Duration) *GoSpider
- func (this *GoSpider) Status() int
- func (this *GoSpider) Stop()
- func (this *GoSpider) URLRules(rules []string) *GoSpider
- func (this *GoSpider) Wait()
- type VisitCallback
- type VisitedCallback
Constants ¶
View Source
const ( StatusPending = iota // 0 StatusProcessing StatusSuspend StatusExiting StatusInvalid StatusStoped )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GoSpider ¶
type GoSpider struct {
// contains filtered or unexported fields
}
func (*GoSpider) AddURLRule ¶
func (*GoSpider) OnVisit ¶
func (this *GoSpider) OnVisit(rule string, f VisitCallback)
func (*GoSpider) OnVisited ¶
func (this *GoSpider) OnVisited(f VisitedCallback)
type VisitCallback ¶
type VisitCallback func(url, html string)
Click to show internal directories.
Click to hide internal directories.