Exemple #1
0
//通过url分析一个页面,获得PageItems
func (this *Spider) Get(url string, respType string) *page.PageItems {
	//TODO
	req := page.NewRequest(url, respType, "GET")
	return this.GetByRequest(req)

}
Exemple #2
0
func (this *Spider) AddUrl(url string, respType string, urlType string) *Spider {
	req := page.NewRequest(url, respType, "GET")
	req.SetUrlTag(urlType)
	this.AddRequest(req)
	return this
}