diff --git a/clear_data.bat b/clear_data.bat index f8689d2..50f755d 100644 --- a/clear_data.bat +++ b/clear_data.bat @@ -107,3 +107,8 @@ adb -s 8f76f9e7 shell am start -n com.android.chrome/com.google.android.apps.chr adb -s c3ba032e shell pm clear com.android.chrome adb -s c3ba032e shell am set-debug-app --persistent com.android.chrome adb -s c3ba032e shell am start -n com.android.chrome/com.google.android.apps.chrome.Main + +#xiao mi 3 +adb -s 2140c70c shell pm clear com.android.chrome +adb -s 2140c70c shell am set-debug-app --persistent com.android.chrome +adb -s 2140c70c shell am start -n com.android.chrome/com.google.android.apps.chrome.Main diff --git a/clear_data.sh b/clear_data.sh index 9e1766b..7b87766 100644 --- a/clear_data.sh +++ b/clear_data.sh @@ -87,3 +87,8 @@ adb -s e08f0a85 shell am start -n com.android.chrome/com.google.android.apps.chr adb -s 192.168.1.24:42397 shell pm clear com.android.chrome adb -s 192.168.1.24:42397 shell am set-debug-app --persistent com.android.chrome adb -s 192.168.1.24:42397 shell am start -n com.android.chrome/com.google.android.apps.chrome.Main + +#xiao mi 3 +adb -s 2140c70c shell pm clear com.android.chrome +adb -s 2140c70c shell am set-debug-app --persistent com.android.chrome +adb -s 2140c70c shell am start -n com.android.chrome/com.google.android.apps.chrome.Main diff --git a/src/workers/CommandorPage.js b/src/workers/CommandorPage.js index 7528582..315fcf6 100644 --- a/src/workers/CommandorPage.js +++ b/src/workers/CommandorPage.js @@ -294,7 +294,6 @@ class CommandorPage { } async onPageLoad(currentPage) { - console.log("onPageLoad called, url is " + currentPage.url()) try { let content = await currentPage.content(); let captcha_url = "geo.captcha-delivery.com/captcha"; @@ -319,7 +318,7 @@ class CommandorPage { log("successful"); await this.push_message_to_queue(PublishType.SUCCESS); } else if (content.includes(EMPTY_RESPONSE_ERROR)) { - console.log("EMPTY_RESPONSE_ERROR error received, will quit") + log("EMPTY_RESPONSE_ERROR error received, will quit") this.isTerminated = true } else { // try to get errors @@ -388,7 +387,6 @@ class CommandorPage { let errorItem = this.page.locator("div.alert"); if (errorItem) { let errorContent = await errorItem.innerHTML(); - log("error:" + errorContent); await this.handleError(errorContent); } } catch (e) { @@ -398,10 +396,12 @@ class CommandorPage { } async handleError(errorContent) { + log("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)) { - // todo, add contact to black list + //add contact to black list and set terminated the task + log("handle error: will save to black list db"); await this.saveToBlackList() } else if (errorContent.includes(CAPTCHA_ERROR_MESSAGE) || errorContent.includes(CAPTCHA_ERROR_MESSAGE_FR)) { this.isTerminated = true;