diff --git a/dict.go b/dict.go index 9721269..302fc62 100644 --- a/dict.go +++ b/dict.go @@ -31,7 +31,13 @@ func main() { fromto = os.Args[2] + "." } - r, err := http.Get("http://" + fromto + BASE + url.QueryEscape(os.Args[1])) + req, err := http.NewRequest("GET", "https://"+fromto+BASE+url.QueryEscape(os.Args[1]), nil) + if err != nil { + panic(err) + } + req.Header.Add("User-Agent", "Mozilla/5.0 (X11; Linux x86_64; rv:126.0) Gecko/20100101 Firefox/126.0") + r, err := http.DefaultClient.Do(req) + if err != nil { println("error:", err.Error()) return