need to use openCv to identifiy text
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user