From df5559a7d382d48990e4b18cb23cc89e50b448c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A2=AB=E9=81=97=E5=BF=98=E7=9A=84=E8=AE=B0=E5=BF=86?= <32097237+YIWANG-sketch@users.noreply.github.com> Date: Wed, 18 Sep 2024 11:54:01 +0800 Subject: [PATCH] fix automatic login --- provider.mjs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/provider.mjs b/provider.mjs index e0490e2..cfa1c37 100644 --- a/provider.mjs +++ b/provider.mjs @@ -30,10 +30,10 @@ class YouProvider { getRandomSwitchThreshold() { if (this.currentMode === "default") { - return Math.floor(Math.random() * 6) + 1; + return Math.floor(Math.random() * 3) + 1; } else { // custom模式回合不小于上一次default - return Math.floor(Math.random() * (7 - this.lastDefaultThreshold)) + this.lastDefaultThreshold; + return Math.floor(Math.random() * (4 - this.lastDefaultThreshold)) + this.lastDefaultThreshold; } } @@ -326,7 +326,7 @@ class YouProvider { const loginInfo = await page.evaluate(() => { const userProfileElement = document.querySelector('[data-testid="user-profile-button"]'); if (userProfileElement) { - const emailElement = userProfileElement.querySelector('.sc-9d7dc8d-4'); + const emailElement = userProfileElement.querySelector('.sc-3ab4f4f1-4'); return emailElement ? emailElement.textContent : null; } return null;