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.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 BLANK_URL = "about:blank"
|
||||
const ERROR_CAPTCHA_UNSOLVABLE = "ERROR_CAPTCHA_UNSOLVABLE";
|
||||
@@ -312,6 +312,9 @@ class CommandorPage {
|
||||
await this.push_message_to_queue(PublishType.SUCCESS)
|
||||
return
|
||||
}
|
||||
//check whether there is captcha
|
||||
let hasCaptcha = await page.isVisible("g-recaptcha-response")
|
||||
if (hasCaptcha) {
|
||||
this.captchaSolver = new SolveCaptcha(page);
|
||||
await this.captchaSolver.start((solution) => {
|
||||
log("solution is: " + solution);
|
||||
@@ -333,6 +336,9 @@ class CommandorPage {
|
||||
this.isTerminated = true;
|
||||
}
|
||||
})
|
||||
} else {
|
||||
await this.clickValid();
|
||||
}
|
||||
}
|
||||
|
||||
async isBlocked() {
|
||||
|
||||
Reference in New Issue
Block a user