diff --git a/main.go b/main.go index ebc4418..3ff8dff 100644 --- a/main.go +++ b/main.go @@ -71,7 +71,16 @@ func download(url string, cachepath string) { fmt.Printf("Fetching [%v]\n", url) client := makeTorifiedClient() - resp, err := client.Get(url) + req, err := http.NewRequest("GET", url, nil) + if err != nil { + log.Fatalln(err) + } + + // Set User Agent to be Tor Browser (it likely won't be hard for a site to determine these requests are partially automated, but a little more obfuscation is never a bad idea) + req.Header.Set("User-Agent", "Mozilla/5.0 (Windows NT 6.1; rv:60.0) Gecko/20100101 Firefox/60.0") + + resp, err := client.Do(req) + if err == nil { defer resp.Body.Close() body, _ := ioutil.ReadAll(resp.Body)