func ExtractData(entity *Entity, url string) {
	// Parsing completion channel.
	done := make(chan bool, 1)

	res, err := http.Get(url)
	if err != nil {
		log.Panicln("Error requesting URL data: ", err)
	}

	defer res.Body.Close()

	doc, err := html.Parse(res.Body)
	if err != nil {
		log.Println("Error parsing URL body: ", err)
	}

	go ParseHTML(doc, entity, done)

	for {
		select {
		case <-done:
			go finalizeEntity(entity, doc, EntityDir)
		default:
		}
	}
}
// Make a GET request to the given URL and start parsing
// its HTML.
Make a GET request to the given URL and start parsing
its HTML.
// Make a GET request to the given URL and start parsing // its HTML .
func ExtractData(entity *Entity, url string) {
	done := make(chan bool, 1)
	res, err := http.Get(url)
	if err != nil {
		log.Panicln("Error requesting URL data: ", err)
	}
	defer res.Body.Close()
	doc, err := html.Parse(res.Body)
	if err != nil {
		log.Println("Error parsing URL body: ", err)
	}
	go ParseHTML(doc, entity, done)
	for {
		select {
		case <-done:
			go finalizeEntity(entity, doc, EntityDir)
		default:
		}
	}
}
func ExtractData ( entity * Entity , url string ) { done := make ( chan bool , 1 ) res , err := http . Get ( url ) if err != nil { log . Panicln ( " " , err ) } defer res . Body . Close ( ) doc , err := html . Parse ( res . Body ) if err != nil { log . Println ( " " , err ) } go ParseHTML ( doc , entity , done ) for { select { case <- done : go finalizeEntity ( entity , doc , EntityDir ) default : } } }
Make a GET request to the given URL and start parsing
its HTML.
Make a GET request to the given URL and start parsing its HTML .
// Parsing completion channel.