Skip to content

Commit 1ba0ef7

Browse files
John NyingiJohn Nyingi
John Nyingi
authored and
John Nyingi
committed
Fixed ExampleScrape Sample
1 parent 795f67a commit 1ba0ef7

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

README.md

+5-6
Original file line numberDiff line numberDiff line change
@@ -123,12 +123,11 @@ func ExampleScrape() {
123123
}
124124

125125
// Find the review items
126-
doc.Find(".sidebar-reviews article .content-block").Each(func(i int, s *goquery.Selection) {
127-
// For each item found, get the band and title
128-
band := s.Find("a").Text()
129-
title := s.Find("i").Text()
130-
fmt.Printf("Review %d: %s - %s\n", i, band, title)
131-
})
126+
doc.Find(".left-content article .post-title").Each(func(i int, s *goquery.Selection) {
127+
// For each item found, get the title
128+
title := s.Find("a").Text()
129+
fmt.Printf("Review %d: %s\n", i, title)
130+
})
132131
}
133132

134133
func main() {

0 commit comments

Comments
 (0)