From bfe7ec77ab230d8baeae92fc06361a38a5f79df1 Mon Sep 17 00:00:00 2001 From: Yutousama <583819556@qq.com> Date: Tue, 3 May 2022 10:11:04 +0800 Subject: [PATCH] update --- src/main/java/com/yutou/qqbot/models/WebSign/NicePT.java | 1 + src/main/java/com/yutou/qqbot/models/WebSign/Tsdm.java | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/yutou/qqbot/models/WebSign/NicePT.java b/src/main/java/com/yutou/qqbot/models/WebSign/NicePT.java index 0d1b39b..a3e59ea 100644 --- a/src/main/java/com/yutou/qqbot/models/WebSign/NicePT.java +++ b/src/main/java/com/yutou/qqbot/models/WebSign/NicePT.java @@ -56,6 +56,7 @@ public class NicePT extends Model { try { driver.manage().timeouts().implicitlyWait(10000, TimeUnit.SECONDS); driver.get(url); + driver.navigate().refresh(); for (Cookie _cookie : WebClient.loadCookie(array)) { driver.manage().addCookie(_cookie); } diff --git a/src/main/java/com/yutou/qqbot/models/WebSign/Tsdm.java b/src/main/java/com/yutou/qqbot/models/WebSign/Tsdm.java index 53fc3e0..5525ade 100644 --- a/src/main/java/com/yutou/qqbot/models/WebSign/Tsdm.java +++ b/src/main/java/com/yutou/qqbot/models/WebSign/Tsdm.java @@ -50,9 +50,9 @@ public class Tsdm extends Model { if ("08:05:00".equals(time)) { Log.i("开始天使动漫签到"); try { - if(tsdmSign()) { + if (tsdmSign()) { QQBotManager.getInstance().sendMessage(QQBotManager.defGroup, "已完成天使动漫的签到"); - }else{ + } else { QQBotManager.getInstance().sendMessage(QQBotManager.defGroup, "天使动漫签到失败"); } } catch (Exception e) { @@ -71,6 +71,7 @@ public class Tsdm extends Model { WebDriver driver = WebClient.getInstance().getWebDriver(); try { driver.get("https://www.tsdm39.net/forum.php"); + driver.navigate().refresh(); getTsdm(array, driver); boolean isSign = false; for (WebElement element : driver.findElements(By.xpath("//a"))) {