Description

Find returns the first node which matches the matcher using depth-first search. If no node is found, ok will be false.

root, err := html.Parse(resp.Body)
if err != nil {
    // handle error
}
matcher := func(n *html.Node) bool {
    return n.DataAtom == atom.Body
}
body, ok := scrape.Find(root, matcher)

Find is referenced in 11 repositories

github.com/yhat/scrape github.com/tommady/pttifierLib github.com/onuryilmaz/eksisozluk-cli

...