From 0a2e9cd411d0cda86349517bb1b43ee0b1dbcccf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Mon, 18 May 2020 15:15:23 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95request?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- platformapi/jdshopapi/store_page.go | 1 + 1 file changed, 1 insertion(+) diff --git a/platformapi/jdshopapi/store_page.go b/platformapi/jdshopapi/store_page.go index c767c085..efb7ed5a 100644 --- a/platformapi/jdshopapi/store_page.go +++ b/platformapi/jdshopapi/store_page.go @@ -24,6 +24,7 @@ func (a *API) AccessStorePage(fullURL string, bizParams map[string]interface{}, } else { request, _ = http.NewRequest(http.MethodGet, utils.GenerateGetURL(fullURL, "", bizParams), nil) request.Header.Set("referer", "https://stores.shop.jd.com/stores/storeinfolistview") + request.Header.Set("user-agent", "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.120 Safari/537.36") } a.FillRequestCookies(request) fmt.Println("tes11", utils.Format4Output(request.Context(), false))