check recaptcha before calling 2captcha
This commit is contained in:
@@ -7,7 +7,7 @@ const {
|
|||||||
shell
|
shell
|
||||||
} = require('electron')
|
} = require('electron')
|
||||||
const GeoCaptchaSolver = require("./GeoCaptchaSolver");
|
const GeoCaptchaSolver = require("./GeoCaptchaSolver");
|
||||||
// const RDV_URL = "http://192.168.0.41: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 RDV_URL = "https://rendezvousparis.hermes.com/client/register";
|
||||||
const BLANK_URL = "about:blank"
|
const BLANK_URL = "about:blank"
|
||||||
const ERROR_CAPTCHA_UNSOLVABLE = "ERROR_CAPTCHA_UNSOLVABLE";
|
const ERROR_CAPTCHA_UNSOLVABLE = "ERROR_CAPTCHA_UNSOLVABLE";
|
||||||
@@ -312,6 +312,9 @@ class CommandorPage {
|
|||||||
await this.push_message_to_queue(PublishType.SUCCESS)
|
await this.push_message_to_queue(PublishType.SUCCESS)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
//check whether there is captcha
|
||||||
|
let hasCaptcha = await page.isVisible("g-recaptcha-response")
|
||||||
|
if (hasCaptcha) {
|
||||||
this.captchaSolver = new SolveCaptcha(page);
|
this.captchaSolver = new SolveCaptcha(page);
|
||||||
await this.captchaSolver.start((solution) => {
|
await this.captchaSolver.start((solution) => {
|
||||||
log("solution is: " + solution);
|
log("solution is: " + solution);
|
||||||
@@ -333,6 +336,9 @@ class CommandorPage {
|
|||||||
this.isTerminated = true;
|
this.isTerminated = true;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
} else {
|
||||||
|
await this.clickValid();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async isBlocked() {
|
async isBlocked() {
|
||||||
|
|||||||
Reference in New Issue
Block a user