Documentation ¶
Index ¶
- type ISpider
- type Spider
- func (spider *Spider) AddUrlFilter(filterId string, fn func(targetUrl string) bool)
- func (spider *Spider) OnError(fn func(string, error))
- func (spider *Spider) OnHtml(fn func(*goquery.Document))
- func (spider *Spider) OnSuccess(fn func(*http.Response))
- func (spider *Spider) OnXml(fn func(*goquery.Document))
- func (spider *Spider) RandomProxy() *url.URL
- func (spider *Spider) RoundRobinProxy() *url.URL
- func (spider *Spider) RunMany(targetUrls []string)
- func (spider *Spider) RunManyAsync(targetUrls []string)
- func (spider *Spider) RunManyAsyncAwait(targetUrls []string)
- func (spider *Spider) RunOne(targetUrl string)
- func (spider *Spider) RunOneAsync(targetUrl string)
- func (spider *Spider) RunOneAsyncAwait(targetUrl string)
- type SpiderConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ISpider ¶
type ISpider interface { RunManyAsync(targetUrls []string) RunManyAsyncAwait(targetUrls []string) RunMany(targetUrls []string) RunOneAsync(targetUrl string) RunOneAsyncAwait(targetUrl string) RunOne(targetUrl string) OnSuccess(func(*http.Response)) OnError(func(string, error)) OnHtml(func(*goquery.Document)) OnXml(func(*goquery.Document)) AddUrlFilter(string, func(string) bool) }
type Spider ¶
type Spider struct { ISpider // contains filtered or unexported fields }
Basic spider struct implimenting ISpider
func (*Spider) AddUrlFilter ¶
func (*Spider) RandomProxy ¶
func (*Spider) RoundRobinProxy ¶
func (*Spider) RunManyAsync ¶
func (*Spider) RunManyAsyncAwait ¶
func (*Spider) RunOneAsync ¶
func (*Spider) RunOneAsyncAwait ¶
type SpiderConfig ¶
func DefaultConfig ¶
func DefaultConfig() *SpiderConfig
Click to show internal directories.
Click to hide internal directories.