Relative URL handling added to Response type.

This commit is contained in:
Musab Gültekin
2019-06-07 15:44:14 +03:00
parent 944bd3bada
commit e58b08cbd6
4 changed files with 39 additions and 7 deletions

View File

@ -23,6 +23,9 @@ func TestGezer_StartURLs_HTML(t *testing.T) {
r.Doc.Find("div.quote").Each(func(i int, s *goquery.Selection) {
fmt.Println(i, s.Find("span.text").Text(), s.Find("small.author").Text())
})
if href, ok := r.Doc.Find("li.next > a").Attr("href"); ok {
r.Gezer.Get(r.JoinURL(href))
}
},
})
gezer.Start()