diff options
author | Dimitri Sokolyuk <demon@dim13.org> | 2016-12-20 22:31:36 +0100 |
---|---|---|
committer | Dimitri Sokolyuk <demon@dim13.org> | 2016-12-20 22:31:36 +0100 |
commit | 427c69ac5540e7dff4ab5e1bff9f974408f7b843 (patch) | |
tree | 50ab572ed104f3188fb0300471c328b212b21ace /href.go | |
parent | af9d52576e6d3fc5fc2d3483a479de4618f3e0c9 (diff) |
Remove reddit hack
Diffstat (limited to 'href.go')
-rw-r--r-- | href.go | 12 |
1 files changed, 1 insertions, 11 deletions
@@ -4,8 +4,6 @@ import ( "errors" "log" "net/http" - "net/http/cookiejar" - "net/url" "strings" irc "github.com/fluffle/goirc/client" @@ -31,15 +29,7 @@ func title(n *html.Node) (s string) { } func findTitle(uri string) (string, error) { - client := &http.Client{} - if strings.Contains(uri, "reddit.com") { - u, _ := url.Parse(uri) - cookies := []*http.Cookie{&http.Cookie{Name: "over18", Value: "1"}} - client.Jar, _ = cookiejar.New(nil) - client.Jar.SetCookies(u, cookies) - } - - resp, err := client.Get(uri) + resp, err := http.Get(uri) if err != nil { return "", err } |