add more logs
This commit is contained in:
@@ -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 pm clear com.android.chrome
|
||||||
adb -s c3ba032e shell am set-debug-app --persistent 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
|
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
|
||||||
|
|||||||
@@ -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 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 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
|
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
|
||||||
|
|||||||
@@ -294,7 +294,6 @@ class CommandorPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async onPageLoad(currentPage) {
|
async onPageLoad(currentPage) {
|
||||||
console.log("onPageLoad called, url is " + currentPage.url())
|
|
||||||
try {
|
try {
|
||||||
let content = await currentPage.content();
|
let content = await currentPage.content();
|
||||||
let captcha_url = "geo.captcha-delivery.com/captcha";
|
let captcha_url = "geo.captcha-delivery.com/captcha";
|
||||||
@@ -319,7 +318,7 @@ class CommandorPage {
|
|||||||
log("successful");
|
log("successful");
|
||||||
await this.push_message_to_queue(PublishType.SUCCESS);
|
await this.push_message_to_queue(PublishType.SUCCESS);
|
||||||
} else if (content.includes(EMPTY_RESPONSE_ERROR)) {
|
} 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
|
this.isTerminated = true
|
||||||
} else {
|
} else {
|
||||||
// try to get errors
|
// try to get errors
|
||||||
@@ -388,7 +387,6 @@ class CommandorPage {
|
|||||||
let errorItem = this.page.locator("div.alert");
|
let errorItem = this.page.locator("div.alert");
|
||||||
if (errorItem) {
|
if (errorItem) {
|
||||||
let errorContent = await errorItem.innerHTML();
|
let errorContent = await errorItem.innerHTML();
|
||||||
log("error:" + errorContent);
|
|
||||||
await this.handleError(errorContent);
|
await this.handleError(errorContent);
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
@@ -398,10 +396,12 @@ class CommandorPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async handleError(errorContent) {
|
async handleError(errorContent) {
|
||||||
|
log("handle error:" + errorContent);
|
||||||
if (errorContent.includes(DOUBLE_REQUEST_ERROR_MESSAGE) || errorContent.includes(DOUBLE_REQUEST_ERROR_MESSAGE_FR)) {
|
if (errorContent.includes(DOUBLE_REQUEST_ERROR_MESSAGE) || errorContent.includes(DOUBLE_REQUEST_ERROR_MESSAGE_FR)) {
|
||||||
this.isTerminated = true;
|
this.isTerminated = true;
|
||||||
} else if (errorContent.includes(TOO_MANY_REQUEST_ERROR_MESSAGE) || errorContent.includes(TOO_MANY_REQUEST_ERROR_MESSAGE_FR)) {
|
} 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()
|
await this.saveToBlackList()
|
||||||
} else if (errorContent.includes(CAPTCHA_ERROR_MESSAGE) || errorContent.includes(CAPTCHA_ERROR_MESSAGE_FR)) {
|
} else if (errorContent.includes(CAPTCHA_ERROR_MESSAGE) || errorContent.includes(CAPTCHA_ERROR_MESSAGE_FR)) {
|
||||||
this.isTerminated = true;
|
this.isTerminated = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user