更换百合会签到
This commit is contained in:
parent
d56d6edf19
commit
6eedb9786e
@ -44,7 +44,7 @@ public class BaiHeHui extends Model {
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
QQBotManager.getInstance().sendMessage(QQBotManager.defGroup, "百合会签到失败:" + AppTools.getExceptionString(e));
|
||||
}finally {
|
||||
} finally {
|
||||
WebClient.getInstance().quit();
|
||||
}
|
||||
}
|
||||
@ -53,10 +53,10 @@ public class BaiHeHui extends Model {
|
||||
public boolean sign() {
|
||||
WebDriver driver = WebClient.getInstance().getWebDriver();
|
||||
try {
|
||||
driver.manage().timeouts().implicitlyWait( Duration.ofSeconds(5));
|
||||
driver.manage().timeouts().implicitlyWait(Duration.ofSeconds(5));
|
||||
driver.get("https://bbs.yamibo.com/forum.php");
|
||||
login(driver);
|
||||
// driver.manage().deleteAllCookies();
|
||||
// driver.manage().deleteAllCookies();
|
||||
/* Thread.sleep(1000);
|
||||
for (Cookie _cookie : WebClient.loadCookie(array)) {
|
||||
System.err.println(_cookie);
|
||||
@ -69,10 +69,10 @@ public class BaiHeHui extends Model {
|
||||
e.printStackTrace();
|
||||
}
|
||||
driver.navigate().refresh();
|
||||
driver.get("https://bbs.yamibo.com/forum.php");
|
||||
driver.get("https://bbs.yamibo.com/plugin.php?id=zqlj_sign");
|
||||
for (WebElement element : driver.findElements(By.xpath("//a"))) {
|
||||
if ("打卡签到".equals(element.getText())) {
|
||||
element.click();
|
||||
if ("点击打卡".equals(element.getText())) {
|
||||
element.click();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user