// 批量url生成请求,并添加至队列。 func (self *Context) BulkAddQueue(urls []string, req *context.Request) *Context { for _, url := range urls { req.SetUrl(url) self.AddQueue(req) } return self }
// 批量url生成请求,并添加至队列 func (self *Spider) BulkAddQueue(urls []string, req *context.Request) { for _, url := range urls { req.SetUrl(url) self.AddQueue(req) } }