![](/img/trans.png)
[英]What to set in userPrefs to open devtools at the bottom in puppeteer-extra?
[英]How to click on the Hcaptcha using puppeteer-extra
我正在使用 puppeteer-extra 並嘗試單擊recaptcha,但我在谷歌中找不到兩天的解決方案我嘗試了不止一種方法,但沒有成功我希望它使用 puppeteer 自動單擊復選框
我的問題不在於解決驗證碼,我的問題在於單擊其復選框
This is iframe Selector: #app-mount > div.app-1q1i1E > div > div > div > section > div > div.flexCenter-3_1bcw.flex-1O1GKY.justifyCenter-3D2jYp.alignCenter-1dQNNs > div > iframe This is iframe: <iframe src="https://newassets.hcaptcha.com/captcha/v1/f9bf301/static/hcaptcha-checkbox.html#id=29x2xvbwuudm&host=discord.com&sentry=true&reportapi=https%3A%2F%2Faccounts.hcaptcha.com&recaptchacompat=true&custom=false&hl=en&tplinks=on&sitekey=f5561ba9-8f1e-40ca-9b5b-a0b3f719ef34&theme=dark" title="widget containing checkbox for hCaptcha security challenge" tabindex="0" frameborder="0" scrolling="no" data-hcaptcha-widget-id="29x2xvbwuudm" data-hcaptcha-response="" style="width: 303px; height: 78px; overflow: hidden;"></iframe> -------- This is checkbox: <div id="checkbox" aria-haspopup="true" aria-checked="false" role="checkbox" tabindex="0" aria-live="assertive" aria-labelledby="a11y-label" style="position: absolute; width: 28px; height: 28px; border-width: 1px; border-style: solid; border-color: rgb(245, 245, 245); border-radius: 4px; background-color: rgb(250, 250, 250); top: 0px; left: 0px;"></div>
await page.waitForFunction(`#app-mount > div.app-1q1i1E > div > div > div > section > div >
div.flexCenter-3_1bcw.flex-1O1GKY.justifyCenter-3D2jYp.alignCenter-1dQNNs > div > iframe`)
await page.click(`#checkbox`),
我基本上試圖做同樣的事情,我已經通過將驗證碼發送到驗證碼服務來繞過驗證碼。 但是我想基本上先嘗試單擊它,因此它嘗試通過單擊來解決它,如果它失敗並且必須僅解決它,它就會激活旁路。
您的選擇器似乎是錯誤的。 當 hcaptcha 啟動時,它會生成隨機的 class 名稱(哈希),因此您無法在您的機器上嘗試,獲取 class 名稱並將其投入生產,因為每次執行都是不同的 ZA2F2ED4F8EBC2CBB4C21A29DZ40AB6 名稱。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.