From 1ba0ef7e9b56261b4aee7b5b8af2e1ca1b3589b0 Mon Sep 17 00:00:00 2001 From: John Nyingi Date: Fri, 4 Jun 2021 21:37:05 +0300 Subject: [PATCH] Fixed ExampleScrape Sample --- README.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 6680dc1..718a3f5 100644 --- a/README.md +++ b/README.md @@ -123,12 +123,11 @@ func ExampleScrape() { } // Find the review items - doc.Find(".sidebar-reviews article .content-block").Each(func(i int, s *goquery.Selection) { - // For each item found, get the band and title - band := s.Find("a").Text() - title := s.Find("i").Text() - fmt.Printf("Review %d: %s - %s\n", i, band, title) - }) + doc.Find(".left-content article .post-title").Each(func(i int, s *goquery.Selection) { + // For each item found, get the title + title := s.Find("a").Text() + fmt.Printf("Review %d: %s\n", i, title) + }) } func main() {