This commit is contained in:
Yutousama 2022-05-03 10:11:04 +08:00
parent accead7817
commit bfe7ec77ab
2 changed files with 4 additions and 2 deletions

View File

@ -56,6 +56,7 @@ public class NicePT extends Model {
try { try {
driver.manage().timeouts().implicitlyWait(10000, TimeUnit.SECONDS); driver.manage().timeouts().implicitlyWait(10000, TimeUnit.SECONDS);
driver.get(url); driver.get(url);
driver.navigate().refresh();
for (Cookie _cookie : WebClient.loadCookie(array)) { for (Cookie _cookie : WebClient.loadCookie(array)) {
driver.manage().addCookie(_cookie); driver.manage().addCookie(_cookie);
} }

View File

@ -50,9 +50,9 @@ public class Tsdm extends Model {
if ("08:05:00".equals(time)) { if ("08:05:00".equals(time)) {
Log.i("开始天使动漫签到"); Log.i("开始天使动漫签到");
try { try {
if(tsdmSign()) { if (tsdmSign()) {
QQBotManager.getInstance().sendMessage(QQBotManager.defGroup, "已完成天使动漫的签到"); QQBotManager.getInstance().sendMessage(QQBotManager.defGroup, "已完成天使动漫的签到");
}else{ } else {
QQBotManager.getInstance().sendMessage(QQBotManager.defGroup, "天使动漫签到失败"); QQBotManager.getInstance().sendMessage(QQBotManager.defGroup, "天使动漫签到失败");
} }
} catch (Exception e) { } catch (Exception e) {
@ -71,6 +71,7 @@ public class Tsdm extends Model {
WebDriver driver = WebClient.getInstance().getWebDriver(); WebDriver driver = WebClient.getInstance().getWebDriver();
try { try {
driver.get("https://www.tsdm39.net/forum.php"); driver.get("https://www.tsdm39.net/forum.php");
driver.navigate().refresh();
getTsdm(array, driver); getTsdm(array, driver);
boolean isSign = false; boolean isSign = false;
for (WebElement element : driver.findElements(By.xpath("//a"))) { for (WebElement element : driver.findElements(By.xpath("//a"))) {