diff --git a/src/workers/LinkValidator.js b/src/workers/LinkValidator.js index 0e2dbb7..0e91086 100644 --- a/src/workers/LinkValidator.js +++ b/src/workers/LinkValidator.js @@ -163,9 +163,9 @@ class LinkValidator { async onResponse(response) { // let rex = new RegExp(REGEX_RDV_URL) - log(this.device.model + ":onResponse url:" + response.url()) - log(this.device.model + ":onResponse with statusCode:" + response.statusCode) - log(this.device.model + ":onResponse with message:" + response.statusMessage) + log(this.device.model() + ":onResponse url:" + response.url()) + log(this.device.model() + ":onResponse with statusCode:" + response.statusCode) + log(this.device.model() + ":onResponse with message:" + response.statusMessage) // if (rex.test(response.url())) { // log("rdv url found:" + response.url()) // await this.push_message_to_db(PublishType.SUCCESS, response.url()) @@ -201,12 +201,12 @@ class LinkValidator { } async handleError(errorContent) { - log(this.device.model + ":handle error:" + errorContent); + log(this.device.model() + ":handle error:" + errorContent); if (errorContent.includes(DOUBLE_REQUEST_ERROR_MESSAGE) || errorContent.includes(DOUBLE_REQUEST_ERROR_MESSAGE_FR)) { this.isTerminated = true; } else if (errorContent.includes(TOO_MANY_REQUEST_ERROR_MESSAGE) || errorContent.includes(TOO_MANY_REQUEST_ERROR_MESSAGE_FR)) { //add contact to black list and set terminated the task - log(this.device.model + ":handle error: will save to black list db"); + log(this.device.model() + ":handle error: will save to black list db"); } else if (errorContent.includes(CAPTCHA_ERROR_MESSAGE) || errorContent.includes(CAPTCHA_ERROR_MESSAGE_FR)) { this.isTerminated = true; } @@ -214,7 +214,7 @@ class LinkValidator { } async resetBrowser() { - console.log(this.device.model + ":will reset browser") + console.log(this.device.model() + ":will reset browser") await this.device.shell("pm clear com.android.chrome") await delay(1000) await this.device.shell("am set-debug-app --persistent com.android.chrome")