Fixed README Doc.

This commit is contained in:
Musab Gültekin 2019-06-22 13:13:33 +03:00
parent a64a262554
commit 92e7cfefec

View File

@ -44,13 +44,13 @@ func main() {
} }
func quotesParse(g *geziyor.Geziyor, r *geziyor.Response) { func quotesParse(g *geziyor.Geziyor, r *geziyor.Response) {
r.DocHTML.Find("div.quote").Each(func(i int, s *goquery.Selection) { r.HTMLDoc.Find("div.quote").Each(func(i int, s *goquery.Selection) {
g.Exports <- map[string]interface{}{ g.Exports <- map[string]interface{}{
"text": s.Find("span.text").Text(), "text": s.Find("span.text").Text(),
"author": s.Find("small.author").Text(), "author": s.Find("small.author").Text(),
} }
}) })
if href, ok := r.DocHTML.Find("li.next > a").Attr("href"); ok { if href, ok := r.HTMLDoc.Find("li.next > a").Attr("href"); ok {
g.Get(r.JoinURL(href), quotesParse) g.Get(r.JoinURL(href), quotesParse)
} }
} }