Beispiel #1
0
// 生成请求
func (self *Spider) newRequest(param map[string]interface{}) *context.Request {
	param["Spider"] = self.Name
	if param["PauseTime"] == 0 {
		param["PauseTime"] = self.Pausetime
	}
	if param["Deadline"] == 0 {
		param["Deadline"] = self.Deadline
	}

	req := context.NewRequest(param)
	req.SetSpiderId(self.GetId())
	return req
}
Beispiel #2
0
func (self *Spider) newRequest(param map[string]interface{}) *context.Request {
	param["Spider"] = self.GetName()
	req := context.NewRequest(param)
	req.SetSpiderId(self.GetId())
	return req
}