Merge branch 'feature/disconnect_after_opening_appointment_url' of bitbucket.org:panleicim/puppeteerjs into feature/disconnect_after_opening_appointment_url
This commit is contained in:
@@ -13,6 +13,7 @@ const OCRResult = {
|
||||
TERMINAED: Symbol("TERMINAED"),
|
||||
GOOGLE_DISCONNECT: Symbol("GOOGLE_DISCONNECT"),
|
||||
TO_SKIP: Symbol("TO_SKIP"),
|
||||
RECAPTCHA_FAILED: Symbol("RECAPTCHA_FAILED"),
|
||||
RECAPTCHA_ERROR: Symbol("RECAPTCHA_ERROR"),
|
||||
}
|
||||
module.exports = OCRResult
|
||||
@@ -40,6 +40,7 @@ const CLOSED_MESSAGE_FR = "Depuis plus de 130 ans"
|
||||
const DIALOG_TO_SKIP = "facilement les commandes"
|
||||
const ABOUT_BLANK = "about:blank"
|
||||
const GOOGLE_DISCONNECT_FR = "Rester déconnecté"
|
||||
const RECAPTCHA_FAILED_FR = "captcha a échoué"
|
||||
|
||||
async function convertImageToWhiteBlack(image_path) {
|
||||
const image = await Jimp.read(image_path);
|
||||
@@ -97,6 +98,8 @@ class OCRChecker {
|
||||
return OCRResult.TO_SKIP
|
||||
} else if (result.includes(GOOGLE_DISCONNECT_FR)) {
|
||||
return OCRResult.GOOGLE_DISCONNECT
|
||||
} else if (result.includes(RECAPTCHA_FAILED_FR)) {
|
||||
return OCRResult.TERMINAED
|
||||
} else {
|
||||
return OCRResult.TERMINAED
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user