Skip to content

Instantly share code, notes, and snippets.

@Ch00k
Last active December 14, 2016 13:47
Show Gist options
  • Save Ch00k/53715039b0e169adf907aa9d9d511ef2 to your computer and use it in GitHub Desktop.
Save Ch00k/53715039b0e169adf907aa9d9d511ef2 to your computer and use it in GitHub Desktop.
package main
import (
"fmt"
"golang.org/x/net/html"
"net/http"
)
func main() {
resp, err := http.Get("http://example.com")
if err != nil {
panic(err)
}
doc, err := html.Parse(resp.Body)
if err != nil {
panic(err)
}
fmt.Print(doc)
fmt.Print(doc.Data)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment