Ejemplo n.º 1
0
func (this *Spider) AddUrlsWithHeaderFile(urls []string, respType string, headerFile string) *Spider {
	for _, url := range urls {
		req := request.NewRequestWithHeaderFile(url, respType, headerFile)
		this.AddRequest(req)
	}
	return this
}
Ejemplo n.º 2
0
// AddTargetRequest adds one new Request with header file for waitting for crawl.
func (this *Page) AddTargetRequestWithHeaderFile(url string, respType string, headerFile string) *Page {
	this.targetRequests = append(this.targetRequests, request.NewRequestWithHeaderFile(url, respType, headerFile))
	return this
}
Ejemplo n.º 3
0
func (this *Spider) AddUrlWithHeaderFile(url string, respType string, headerFile string) *Spider {
	req := request.NewRequestWithHeaderFile(url, respType, headerFile)
	this.AddRequest(req)
	return this
}