need to use openCv to identifiy text

This commit is contained in:
2023-05-22 00:57:12 +02:00
parent 0c99c6b36f
commit 48a7338928
7 changed files with 222 additions and 96 deletions
+8
View File
@@ -23,6 +23,8 @@ const CAPTCHA_ERROR_MESSAGE_FR = "La vérification du captcha a échoué"
const BLOCKED_MSG_EN = "have been blocked"
const BLOCKED_MSG_FR = "avez été bloqué"
const CHECKING_MSG_FR = "Verifying"
const ERR_CACHE_MISS = "ERR_CACHE_MISS"
const SLIDING_CAPTCHA_FR = "Glissez vers la droite"
class OCRChecker {
@@ -47,6 +49,12 @@ class OCRChecker {
return OCRResult.RECAPTCHA_ERROR
} else if (result.includes(BLOCKED_MSG_EN) || result.includes(BLOCKED_MSG_FR)) {
return OCRResult.BLOCKED
} else if (result.includes(ERR_CACHE_MISS)) {
return OCRResult.TO_REFRESH
} else if (result.includes(CHECKING_MSG_FR)) {
return OCRResult.RECHECK
} else if (result.includes(SLIDING_CAPTCHA_FR)) {
return OCRResult.SLIDING_CAPTCHA
}
}