From de17ebbc7827c2214094d818c729422a20b075b9 Mon Sep 17 00:00:00 2001 From: Lei PAN Date: Thu, 16 Nov 2023 18:56:06 +0100 Subject: [PATCH] exclude more devices --- src/appointment.js | 5 ++--- src/workers/OCRChecker.js | 5 +++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/appointment.js b/src/appointment.js index 5b1a9f8..7069ba6 100644 --- a/src/appointment.js +++ b/src/appointment.js @@ -5,10 +5,9 @@ const {MongoManager, formatDate} = require("./workers/mongo_manager"); const alert = require('alert'); const schedule = require("node-schedule"); const DeviceExcludeMode = require("./models/DeviceExcludeMode"); - const mongoManager = new MongoManager(); const SEVEN_DAYS_IN_S = 3600 * 24 * 7; -// const NINETY_DAYS_IN_S = 3600 * 24 * 30 * 3; +// const NINETY_DAYS_IN_S = 3600 * 24 * 30 * 3;` const NINETY_DAYS_IN_S = 30 * 3; let excelUtil = new ExcelUtil(); let collectionName = formatDate(new Date()) @@ -16,7 +15,7 @@ let excludeMode = DeviceExcludeMode.SIX let three_to_excludes = ["bec11752", "4e8ca027", "hi7ljr5xduyt9pfi", "EPHUT20825001518"] let four_to_excludes = ["bec11752", "4e8ca027", "hi7ljr5xduyt9pfi", "e30eb015", "EPHUT20825001518"] let seven_to_excludes = ["4e8ca027", "hi7ljr5xduyt9pfi", "e30eb015", "EPHUT20825001518", "bec11752", "fy65eqs4wkvcpf9h", "fuljaueqguugf6pn", "EPHUT20825001518"] -let six_to_excludes = ["4e8ca027", "hi7ljr5xduyt9pfi", "e30eb015", "EPHUT20825001518", "bec11752", "fy65eqs4wkvcpf9h", "07fbd156", "NFD669QK8XNFSCNN", "6X494TTWQGFALB79"] +let six_to_excludes = ["4e8ca027", "hi7ljr5xduyt9pfi", "e30eb015", "EPHUT20825001518", "bec11752", "fy65eqs4wkvcpf9h", "07fbd156", "NFD669QK8XNFSCNN", "6X494TTWQGFALB79","71a0371d"] let nine_to_excludes = ["bec11752", "4e8ca027", "hi7ljr5xduyt9pfi", "e30eb015", "47e7e36b", "p7d6nbw8cu7duous", "njzxojhim7gedyvw", "fmiz5pa6rsx4u4ts", "fy65eqs4wkvcpf9h", "fuljaueqguugf6pn", "EPHUT20825001518", "W8GMFELRHIKZS84T"] let for_scrpay = ["07fbd156", "47e7e36b", "4f55c3d4", "5ac879a2", "69db59f0", "71a0371d", "774687ff", "7b71fb20", "8f76f9e7", "99cyfiaebqcy6poj", "EPHUT20825001518", "J4AXB761H2322WJ", "W8GMFELRHIKZS84T", "ai9xv8hy599hvkee", "b41c1b72", "bec11752", "becb6e99", "c3ba032e", "d54e946", "e30eb015", "fmiz5pa6rsx4u4ts", "fuljaueqguugf6pn", "fy65eqs4wkvcpf9h", "hi7ljr5xduyt9pfi", "njzxojhim7gedyvw", "p7d6nbw8cu7duous"] attributedPorts = [] diff --git a/src/workers/OCRChecker.js b/src/workers/OCRChecker.js index b834a86..aaa9374 100644 --- a/src/workers/OCRChecker.js +++ b/src/workers/OCRChecker.js @@ -23,6 +23,7 @@ const CAPTCHA_ERROR_MESSAGE = "Error verifying captcha, please try again" 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 BLOCKED_MSG_FR_3 = "a été bloqué" const BLOCKED_MSG_FR_2 = "Pourquoi ce blocage" const CHECKING_MSG_FR = "Verifying" const CHECKING_MSG_FR_2 = "Vérification de l'appareil" @@ -104,7 +105,7 @@ class OCRChecker { return OCRResult.FILL_FIELD } else if (result.includes(CAPTCHA_ERROR_MESSAGE) || result.includes(CAPTCHA_ERROR_MESSAGE_FR)) { return OCRResult.RECAPTCHA_ERROR - } else if (result.includes(BLOCKED_MSG_EN) || result.includes(BLOCKED_MSG_FR) || result.includes(BLOCKED_MSG_FR_2)) { + } else if (result.includes(BLOCKED_MSG_EN) || result.includes(BLOCKED_MSG_FR) || result.includes(BLOCKED_MSG_FR_2) || result.includes(BLOCKED_MSG_FR_3)) { await this.deleteFile(fileName) return OCRResult.BLOCKED } else if (result.includes(ERR_CACHE_MISS) || result.includes(ERR_CACHE_MISS_2) || result.includes(ERR_CACHE_MISS_3) || result.includes(ERR_CACHE_MISS_4)) { @@ -153,7 +154,7 @@ class OCRChecker { return OCRResult.TO_SKIP } else if (result.includes(RECAPTCHA_FAILED_FR)) { return OCRResult.TERMINAED - } else if (result.includes(NO_INTERNET_FR)||result.includes(NO_INTERNET_FR_2)) { + } else if (result.includes(NO_INTERNET_FR) || result.includes(NO_INTERNET_FR_2)) { await this.deleteFile(fileName) return OCRResult.NO_INTERNET } else if (result.includes(BRAVE_SKIP_DEFAULT_PAGE) || result.includes(BRAVE_SKIP_DEFAULT_PAGE_2)) {