A very simple way to get links from web page. This library uses the domain of the webpage to correctly parse relative links.
go get -u github.com/schollz/getlinks
urlString := "https://en.wikipedia.org/w/index.php?title=Pauli_exclusion_principle&oldid=854810355"
resp, _ := http.Get(urlString)
defer resp.Body.Close()
links, _ := getlinks.GetLinks(resp.Body, urlString)
fmt.Println(links)
Pull requests are welcome. Feel free to...
MIT