From baaaa1ebf7b7661032a70a96a8a00dca8932cb6b Mon Sep 17 00:00:00 2001 From: Alex Yatskov Date: Mon, 17 Aug 2015 13:25:07 +0900 Subject: [PATCH] Name changes --- scraper.go | 4 ++-- tabelog.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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()