check recaptcha before calling 2captcha
This commit is contained in:
@@ -7,7 +7,7 @@ const {
|
||||
shell
|
||||
} = require('electron')
|
||||
const GeoCaptchaSolver = require("./GeoCaptchaSolver");
|
||||
// const RDV_URL = "http://192.168.0.13:8000/test_appointment.html"
|
||||
// const RDV_URL = "http://192.168.0.13:8000/test_appointment.html";
|
||||
const RDV_URL = "https://rendezvousparis.hermes.com/client/register";
|
||||
const BLANK_URL = "about:blank"
|
||||
const ERROR_CAPTCHA_UNSOLVABLE = "ERROR_CAPTCHA_UNSOLVABLE";
|
||||
@@ -313,7 +313,8 @@ class CommandorPage {
|
||||
return
|
||||
}
|
||||
//check whether there is captcha
|
||||
let hasCaptcha = await page.isVisible("g-recaptcha-response")
|
||||
let pageContent = await page.content()
|
||||
let hasCaptcha = pageContent.includes("g-recaptcha-response")
|
||||
if (hasCaptcha) {
|
||||
this.captchaSolver = new SolveCaptcha(page);
|
||||
await this.captchaSolver.start((solution) => {
|
||||
|
||||
Reference in New Issue
Block a user