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 }
func New() Crawler { return &crawler{ Pipeline: pipeline.New(), Downloader: downloader.NewHttpDownloader(), srcManage: [2]uint{}, } }