From e4f358dccb2c1346c1ac1257e77467f29706924d Mon Sep 17 00:00:00 2001 From: zmr <903716863@qq.com> Date: Fri, 4 Jun 2021 15:42:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9cookie?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/net/educoder/ecsonar/services/SonarService.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/net/educoder/ecsonar/services/SonarService.java b/src/main/java/net/educoder/ecsonar/services/SonarService.java index ed7699b..468144a 100644 --- a/src/main/java/net/educoder/ecsonar/services/SonarService.java +++ b/src/main/java/net/educoder/ecsonar/services/SonarService.java @@ -46,6 +46,7 @@ public class SonarService { //2. 解压目录 String extractPath = zipSavePath + key; if (index==1) { + log.info("savePath: {}, extractPath: {}", savePath, extractPath); extract(savePath, extractPath); } @@ -133,7 +134,7 @@ public class SonarService { private void download(String zipUrl, String zipPath) throws IOException { log.info("下载文件: {}-{}", zipUrl, zipPath); - String cookie = "SL_GWPT_Show_Hide_tmp=1; SL_wptGlobTipTmp=1; autologin_trustie=69dd2e4d0d8c72c7c2e4333f4dd071131f903bf8; UM_distinctid=17975a9ac5591a-0bc2d36ddb4a99-113d6055-fa000-17975a9ac56663; Hm_lvt_871c0ce6df9548f77095372950e14e56=1620798873,1621317930; _educoder_session=007087d500b90f50cc574d80ddb95c3a; Hm_lpvt_871c0ce6df9548f77095372950e14e56=1621319115"; + String cookie = "3567ffee09b5dd08ee05967e23ebf0137a2eeaa9"; URL url = new URL(zipUrl); URLConnection conn = url.openConnection(); conn.setRequestProperty("Cookie", cookie);