aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/main.go b/main.go
index 124a142..e49bc83 100644
--- a/main.go
+++ b/main.go
@@ -289,6 +289,9 @@ func addText(arr []string, str string) []string {
func getPage(pageUrl string) []byte {
client := &http.Client{}
req, err := http.NewRequest("GET", pageUrl, nil)
+ if err != nil {
+ log.Fatal(err)
+ }
req.Header.Add("User-Agent", `Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.27 Safari/537.36`)
res, err := client.Do(req)
if err != nil {