From cc688ddbfd5be9f32b592bafa5b287f0eab28228 Mon Sep 17 00:00:00 2001 From: PAN Lei Date: Sun, 18 Sep 2022 23:31:21 +0200 Subject: [PATCH] can find audio btn --- clear_data.sh | 5 +++++ src/workers/CommandorPage.js | 15 +++++++-------- src/workers/GeoCaptchaSolver.js | 0 3 files changed, 12 insertions(+), 8 deletions(-) create mode 100644 src/workers/GeoCaptchaSolver.js diff --git a/clear_data.sh b/clear_data.sh index 76e09c3..2fd6b36 100644 --- a/clear_data.sh +++ b/clear_data.sh @@ -73,3 +73,8 @@ adb -s ffa9b2bc shell am start -n com.android.chrome/com.google.android.apps.chr adb -s e08f0a85 shell pm clear com.android.chrome adb -s e08f0a85 shell am set-debug-app --persistent com.android.chrome adb -s e08f0a85 shell am start -n com.android.chrome/com.google.android.apps.chrome.Main + +#Nokia 7 plus +adb -s B2NGAA8861320589 shell pm clear com.android.chrome +adb -s B2NGAA8861320589 shell am set-debug-app --persistent com.android.chrome +adb -s B2NGAA8861320589 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 70078b7..d4b6795 100644 --- a/src/workers/CommandorPage.js +++ b/src/workers/CommandorPage.js @@ -297,7 +297,6 @@ class CommandorPage { await this.checkAudioBtn(); for (let i = 0; i < 15; i++) { await delay(1000) - log("will call beep") shell.beep() } log("发现datadome"); @@ -322,13 +321,13 @@ class CommandorPage { } async checkAudioBtn() { - // let iframe = await this.page.locator("iframe").contentFrame; - // let audioBtn = iframe.locator("#captcha__audio__button"); - // if (audioBtn) { - // log("audioBtn found") - // } else { - // log("audioBtn not found") - // } + let audioBtn = await this.page.frameLocator("iframe").locator("#captcha__audio__button"); + if (audioBtn) { + log("audioBtn found") + audioBtn.click() + } else { + log("audioBtn not found") + } } async onResponse(response) { diff --git a/src/workers/GeoCaptchaSolver.js b/src/workers/GeoCaptchaSolver.js new file mode 100644 index 0000000..e69de29