summaryrefslogtreecommitdiffstats
path: root/bot/helpers.go
diff options
context:
space:
mode:
Diffstat (limited to 'bot/helpers.go')
-rw-r--r--bot/helpers.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/bot/helpers.go b/bot/helpers.go
index 3e073e3..cab3b9c 100644
--- a/bot/helpers.go
+++ b/bot/helpers.go
@@ -28,7 +28,14 @@ func httpGet(link string) ([]byte, error) {
}
client := &http.Client{Transport: tr}
- resp, err := client.Get(link)
+ req, err := http.NewRequest("GET", link, nil)
+ if err != nil {
+ return []byte{}, err
+ }
+
+ req.Header.Set("User-Agent", "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.152 Safari/537.36")
+
+ resp, err := client.Do(req)
if err != nil {
return []byte{}, err
}