Fixes and tweaks
This commit is contained in:
parent
9fbd6ce67c
commit
3079c89b67
@ -153,11 +153,8 @@ func collateData(reviews []review) map[uint64]*restaurant {
|
||||
|
||||
var rest *restaurant
|
||||
if rest, _ = restaurants[hash.Sum64()]; rest == nil {
|
||||
restaurants[hash.Sum64()] = &restaurant{
|
||||
name: rev.name,
|
||||
address: rev.address,
|
||||
latitude: rev.latitude,
|
||||
longitude: rev.longitude}
|
||||
rest = &restaurant{name: rev.name, address: rev.address, latitude: rev.latitude, longitude: rev.longitude}
|
||||
restaurants[hash.Sum64()] = rest
|
||||
}
|
||||
|
||||
rest.reviews = append(rest.reviews, rev)
|
||||
|
2904
build/cache/geocache.json
vendored
2904
build/cache/geocache.json
vendored
File diff suppressed because it is too large
Load Diff
@ -155,10 +155,10 @@ func scrape(url string, scr scraper) ([]review, error) {
|
||||
defer wg.Done()
|
||||
for rev := range out {
|
||||
if rev.err == nil {
|
||||
log.Print(color.GreenString(rev.name))
|
||||
log.Print(color.GreenString(rev.url))
|
||||
reviews = append(reviews, rev)
|
||||
} else {
|
||||
log.Printf("%s (%s)", color.YellowString(rev.name), color.RedString(rev.err.Error()))
|
||||
log.Printf("%s (%s)", color.YellowString(rev.url), color.RedString(rev.err.Error()))
|
||||
}
|
||||
}
|
||||
}()
|
||||
|
Loading…
Reference in New Issue
Block a user