From 25e4493631f06e96880753bd10bf2f81ae172634 Mon Sep 17 00:00:00 2001 From: pluja Date: Sun, 12 Nov 2023 22:13:58 +0100 Subject: [PATCH] Update user agent handling --- src/utils/tos_scraper/scraper.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/utils/tos_scraper/scraper.go b/src/utils/tos_scraper/scraper.go index 7a7abe8..9f668bb 100644 --- a/src/utils/tos_scraper/scraper.go +++ b/src/utils/tos_scraper/scraper.go @@ -35,11 +35,10 @@ func GetBodyHtml(url string) (string, error) { s := rand.NewSource(time.Now().UnixNano()) r := rand.New(s) - userAgent := userAgents[r.Intn(len(userAgents))] req.Header.Set( "User-Agent", - userAgent, + userAgents[r.Intn(len(userAgents))], ) req.Header.Set( "Accept",