From 333f0888bebcba2fba2e330401239f67cb5675f1 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 15 May 2024 22:46:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=8E=B7=E5=8F=96=E9=83=A8?= =?UTF-8?q?=E5=88=86=E7=BD=91=E5=9D=80=E4=BF=A1=E6=81=AF=E5=A4=B1=E8=B4=A5?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- electron/main/commons/index.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/electron/main/commons/index.ts b/electron/main/commons/index.ts index c39222e..22b7bd4 100644 --- a/electron/main/commons/index.ts +++ b/electron/main/commons/index.ts @@ -81,6 +81,8 @@ function downloadImage(windowName: string, url: string) { headers: { "User-Agent": getRandomUserAgent(), }, + maxRedirects: 5, + jar: true, }, function (error, response, body) { if (operation.retry(error)) { @@ -147,6 +149,8 @@ function getURLInfo(windowName: string, url: string, redirect: boolean) { headers: { "User-Agent": getRandomUserAgent(), }, + maxRedirects: 5, + jar: true, }, function (error, response, body) { if (operation.retry(error)) { @@ -245,6 +249,8 @@ function analysisHTML(windowName: string, url: string, data: string) { headers: { "User-Agent": getRandomUserAgent(), }, + maxRedirects: 5, + jar: true, }, function (error, response, body) { if (operation.retry(error)) {