fix BaiHeHui.java
This commit is contained in:
parent
7623858866
commit
0de499fb57
@ -11,6 +11,7 @@ import org.openqa.selenium.WebDriver;
|
||||
import org.openqa.selenium.WebElement;
|
||||
|
||||
import java.io.File;
|
||||
import java.time.Duration;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
@UseModel
|
||||
public class BaiHeHui extends Model {
|
||||
@ -50,14 +51,9 @@ public class BaiHeHui extends Model {
|
||||
}
|
||||
|
||||
public boolean sign() {
|
||||
String cookie = ConfigTools.readFile(new File("baihehui.json"));
|
||||
if (StringUtils.isEmpty(cookie)||true) {
|
||||
return false;
|
||||
}
|
||||
WebDriver driver = WebClient.getInstance().getWebDriver();
|
||||
try {
|
||||
JSONArray array = JSON.parseArray(cookie);
|
||||
driver.manage().timeouts().implicitlyWait(10000, TimeUnit.SECONDS);
|
||||
driver.manage().timeouts().implicitlyWait( Duration.ofSeconds(5));
|
||||
driver.get("https://bbs.yamibo.com/forum.php");
|
||||
login(driver);
|
||||
// driver.manage().deleteAllCookies();
|
||||
|
Loading…
Reference in New Issue
Block a user