diff options
-rw-r--r-- | main.go | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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 { |