Пример #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{},
	}
}