예제 #1
0
func (self *crawler) Init(sp *spider.Spider) Crawler {
	self.Pipeline.Init(sp)
	self.Spider = sp
	self.Downloader = downloader.NewHttpDownloader()
	self.srcManage = [2]uint{}
	return self
}
예제 #2
0
func New() Crawler {
	return &crawler{
		Pipeline:   pipeline.New(),
		Downloader: downloader.NewHttpDownloader(),
		srcManage:  [2]uint{},
	}
}