示例#1
0
文件: context.go 项目: BobbWu/pholcus
// 批量url生成请求,并添加至队列。
func (self *Context) BulkAddQueue(urls []string, req *context.Request) *Context {
	for _, url := range urls {
		req.SetUrl(url)
		self.AddQueue(req)
	}
	return self
}
示例#2
0
// 批量url生成请求,并添加至队列
func (self *Spider) BulkAddQueue(urls []string, req *context.Request) {
	for _, url := range urls {
		req.SetUrl(url)
		self.AddQueue(req)
	}
}