Closed GermanG closed 2 years ago
There is no promise that Bing will not change the page structure in the future. You just change a little code to solve this.
for i, n := range list {
a := htmlquery.FindOne(n, "//a")
if a!= nil {
fmt.Printf("%d %s(%s)\n", i, htmlquery.InnerText(a), htmlquery.SelectAttr(a, "href"))
}
}
Trying to use FindOne (and failing) I ended up testing the example as in the README.md
Any hints?
Thanks!