summaryrefslogtreecommitdiff
path: root/href.go
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2016-12-20 22:31:36 +0100
committerDimitri Sokolyuk <demon@dim13.org>2016-12-20 22:31:36 +0100
commit427c69ac5540e7dff4ab5e1bff9f974408f7b843 (patch)
tree50ab572ed104f3188fb0300471c328b212b21ace /href.go
parentaf9d52576e6d3fc5fc2d3483a479de4618f3e0c9 (diff)
Remove reddit hack
Diffstat (limited to 'href.go')
-rw-r--r--href.go12
1 files changed, 1 insertions, 11 deletions
diff --git a/href.go b/href.go
index ddafd45..0799fad 100644
--- a/href.go
+++ b/href.go
@@ -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
}