diff --git a/scraper.go b/scraper.go index fd36ed5..8b8994e 100644 --- a/scraper.go +++ b/scraper.go @@ -43,7 +43,7 @@ type review struct { type profiler interface { index(doc *goquery.Document) (string, []string) - profile(doc *goquery.Document) *review + review(doc *goquery.Document) *review } func makeAbsUrl(ref, base string) (string, error) { @@ -84,7 +84,7 @@ func scrapeReview(url string, out chan review, cache *webCache, group *sync.Wait doc, err := cache.load(url) if err != nil { log.Printf("failed to scrape review at %s (%v)", url, err) - } else if r := prof.profile(doc); r != nil { + } else if r := prof.review(doc); r != nil { r.url = url out <- *r } diff --git a/tabelog.go b/tabelog.go index be425e8..92d7155 100644 --- a/tabelog.go +++ b/tabelog.go @@ -48,7 +48,7 @@ func (tabelog) index(doc *goquery.Document) (string, []string) { return nextIndexUrl, reviewUrls } -func (tabelog) profile(doc *goquery.Document) *review { +func (tabelog) review(doc *goquery.Document) *review { var r review r.name = doc.Find("a.rd-header__rst-name-main").Text()