diff --git a/clear_data.sh b/clear_data.sh index f903acb..fd2d115 100644 --- a/clear_data.sh +++ b/clear_data.sh @@ -279,4 +279,15 @@ adb -s emulator-5558 shell am start -n com.android.chrome/com.google.android.app adb -s emulator-5560 shell pm clear com.android.chrome adb -s emulator-5560 shell am set-debug-app --persistent com.android.chrome -adb -s emulator-5560 shell am start -n com.android.chrome/com.google.android.apps.chrome.Main \ No newline at end of file +adb -s emulator-5560 shell am start -n com.android.chrome/com.google.android.apps.chrome.Main + +#18 +adb -s 192.168.0.37:5555 shell pm clear com.android.chrome +adb -s 192.168.0.37:5555 shell am set-debug-app --persistent com.android.chrome +adb -s 192.168.0.37:5555 shell am start -n com.android.chrome/com.google.android.apps.chrome.Main + +#18 +adb -s 192.168.0.27:5555 shell pm clear com.android.chrome +adb -s 192.168.0.27:5555 shell am set-debug-app --persistent com.android.chrome +adb -s 192.168.0.27:5555 shell am start -n com.android.chrome/com.google.android.apps.chrome.Main + diff --git a/src/appointment.js b/src/appointment.js index 14e32bf..0b902b1 100644 --- a/src/appointment.js +++ b/src/appointment.js @@ -10,6 +10,7 @@ const SEVEN_DAYS_IN_S = 3600 * 24 * 7; const THIRTY_DAYS_IN_S = 3600 * 24 * 30; let excelUtil = new ExcelUtil(); let collectionName = formatDate(new Date()) +device_to_excludes = ["47e7e36b", "e30eb015"] async function filterAlreadyBookedContacts(contactList) { let alreadyBookedContacts = await mongoManager.getAllSuccessfulItemsForDay(collectionName); @@ -166,11 +167,12 @@ async function startBookWithNumbers(startNumber, endNumber, selectedStore, pathT alert("未找到连接的设备"); return } - let segmentNumber = listWithoutBlackContact.length / devices.length; - console.log("connected device number:" + devices.length) + let filteredDeviceList = devices.filter(device => !device_to_excludes.includes(device.serial())) + let segmentNumber = listWithoutBlackContact.length / filteredDeviceList.length; + console.log("connected device number:" + filteredDeviceList.length) console.log("segmentNumber:" + segmentNumber) - for (let i = 0; i < devices.length; i++) { - startWithList(listWithoutBlackContact.slice(i * segmentNumber, segmentNumber * (i + 1)), devices[i], selectedStore, audioAnalyse, alertBeep); + for (let i = 0; i < filteredDeviceList.length; i++) { + startWithList(listWithoutBlackContact.slice(i * segmentNumber, segmentNumber * (i + 1)), filteredDeviceList[i], selectedStore, audioAnalyse, alertBeep); } }) }) diff --git a/src/workers/CommandorPage.js b/src/workers/CommandorPage.js index 16a7199..d657a30 100644 --- a/src/workers/CommandorPage.js +++ b/src/workers/CommandorPage.js @@ -95,7 +95,7 @@ class CommandorPage { }) try { const item = searchTexts[Math.floor(Math.random() * searchTexts.length)]; - await this.page.goto("https://www.google.com/search?q=" + item, {timeout: 90 * 1000}); + await this.page.goto("https://www.google.com/search?q=" + item+"&lr=lang_en", {timeout: 90 * 1000}); // await this.page.goto(RDV_URL, {timeout: 90 * 1000}); } catch (e) { log(e)