fix bugs
This commit is contained in:
parent
ef50ca0371
commit
115efb3876
@ -178,10 +178,11 @@ public class EtsScraper {
|
|||||||
|
|
||||||
// Download captcha image
|
// Download captcha image
|
||||||
downloadCaptcha(page);
|
downloadCaptcha(page);
|
||||||
|
screenshot(page, "2_after_captcha", downloadDir);
|
||||||
|
|
||||||
// Close dialog again after page reload
|
// Close dialog again after page reload
|
||||||
closeNotificationDialog(page);
|
closeNotificationDialog(page);
|
||||||
screenshot(page, "2_after_close_dialog", downloadDir);
|
screenshot(page, "3_after_close_dialog", downloadDir);
|
||||||
|
|
||||||
// Recognize captcha and perform login
|
// Recognize captcha and perform login
|
||||||
boolean loggedin = doLoginWithCaptcha(page);
|
boolean loggedin = doLoginWithCaptcha(page);
|
||||||
@ -344,7 +345,6 @@ public class EtsScraper {
|
|||||||
Path captchaPath = SCREENSHOT_DIR.resolve("captcha.png");
|
Path captchaPath = SCREENSHOT_DIR.resolve("captcha.png");
|
||||||
java.nio.file.Files.write(captchaPath, body);
|
java.nio.file.Files.write(captchaPath, body);
|
||||||
System.out.println("[+] Captcha saved to: " + captchaPath);
|
System.out.println("[+] Captcha saved to: " + captchaPath);
|
||||||
screenshot(page, "3_after_captcha", downloadDir);
|
|
||||||
System.out.println("[+] Captcha size: " + body.length + " bytes");
|
System.out.println("[+] Captcha size: " + body.length + " bytes");
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
@ -393,7 +393,6 @@ public class EtsScraper {
|
|||||||
System.err.println("[-] Screenshot failed: " + e.getMessage());
|
System.err.println("[-] Screenshot failed: " + e.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public static void sleep(long ms) {
|
public static void sleep(long ms) {
|
||||||
try {
|
try {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user