Ejemplo n.º 1
0
func (self *PipelineFile) Process(items *robot.PageItems, t robot.Task) {
	self.file.WriteString("----------------------------------------------------------------------------------------------\n")
	self.file.WriteString("Crawled url :\t" + items.GetRequest().GetUrl() + "\n")
	self.file.WriteString("Crawled result : \n")
	for key, value := range items.GetAll() {
		self.file.WriteString(key + "\t:\t" + value + "\n")
	}
}
Ejemplo n.º 2
0
func (self *PipelineConsole) Process(items *robot.PageItems, t robot.Task) {
	println("----------------------------------------------------------------------------------------------")
	println("Crawled url :\t" + items.GetRequest().GetUrl() + "\n")
	println("Crawled result : ")
	for key, value := range items.GetAll() {
		println(key + "\t:\t" + value)
	}
}