Esempio n. 1
0
func main() {
	//	http.HandleFunc("/", handler)
	//	http.ListenAndServe(":8080", nil)

	urlCh := make(chan *url.URL)

	responseCh := make(chan *http.Response)

	go crawler.SeedUrlLoader(urlCh)

	go crawler.Getter(urlCh, responseCh)

	go crawler.Parser(responseCh, urlCh)

	time.Sleep(time.Millisecond * 10000)
}
Esempio n. 2
0
func main() {
	//	http.HandleFunc("/", handler)
	//	http.ListenAndServe(":8080", nil)

	urlCh := make(chan string)

	pageCh := make(chan string)

	go crawler.SeedUrlMaker(urlCh)

	go crawler.Getter(urlCh, pageCh)

	go crawler.Parser(pageCh, urlCh)

	time.Sleep(time.Millisecond * 10000)
}