berstend / puppeteer-extra

💯 Teach puppeteer new tricks through plugins.
https://extra.community
MIT License
6.23k stars 731 forks source link

[Bug] recaptcha not detected #854

Closed phileasme closed 7 months ago

phileasme commented 7 months ago

Describe the bug The selector is caught, but unfortunately the solveRecaptchas() does not detect any Recaptchas. I've also paste the additional flags as recommended. logs: puppeteer-extra-plugin:recaptcha solveRecaptchas +0ms puppeteer-extra-plugin:recaptcha findRecaptchas +0ms puppeteer-extra-plugin:recaptcha hasRecaptchaScriptTag false +0ms puppeteer-extra-plugin:recaptcha hasHcaptchaScriptTag false +0ms puppeteer-extra-plugin:recaptcha _generateContentScript recaptcha findRecaptchas undefined +0ms puppeteer-extra-plugin:recaptcha:cs Intialized {"url":"https://www.maybeinsta.com/challenge/?next=https%3A%2F%2Fwww.maybeinsta.com%2F%3F__coig_challenged%3D1","opts":{"visualFeedback":true,"debugBinding":"___pepr_cs"}} +0ms puppeteer-extra-plugin:recaptcha:cs findRecaptchas {"url":"https://www.maybeinsta.com/challenge/?next=https%3A%2F%2Fwww.maybeinsta.com%2F%3F__coig_challenged%3D1","hasClients":false} +1ms puppeteer-extra-plugin:recaptcha _generateContentScript hcaptcha findRecaptchas undefined +0ms puppeteer-extra-plugin:recaptcha Filter results: 0 of 0 captchas filtered from results. +0ms puppeteer-extra-plugin:recaptcha findRecaptchas { captchas: [], filtered: [], error: null } +0ms puppeteer-extra-plugin:recaptcha solveRecaptchas { captchas: [], filtered: [], solutions: [], solved: [], error: null } +0ms

Code Snippet

await page.waitForSelector('iframe[src*="recaptcha/"]') // <- Works (document.querySelector catches the iframe)👌 
await page.solveRecaptchas() // <- doesn't work 👎 

I tried frame".solveRecaptchas" too but it states it's not a function, maybe this could be the issue? From the following:

        for (const frame of page.mainFrame().childFrames()) {
          // Attempt to solve any potential captchas in those frames
          await frame.solveRecaptchas()
        }
Screenshot 2023-11-09 at 23 31 28

Versions

System: OS: macOS 12.7.1 CPU: (8) x64 Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz Memory: 27.62 MB / 16.00 GB Shell: 5.8.1 - /bin/zsh Binaries: Node: 18.0.0 - ~/.nvm/versions/node/v18.0.0/bin/node Yarn: 1.12.1 - /usr/local/bin/yarn npm: 9.6.7 - ~/.nvm/versions/node/v18.0.0/bin/npm npmPackages: puppeteer: ^21.5.1 => 21.5.1 puppeteer-extra: ^3.3.6 => 3.3.6 puppeteer-extra-plugin-recaptcha: ^3.6.8 => 3.6.8 puppeteer-extra-plugin-stealth: ^2.11.2 => 2.11.2

phileasme commented 7 months ago

Assuming the recaptcha plugin is unmaintained found a working alternative.

mohanagy commented 6 months ago

@phileasme can you please share what is the alternative

yangfan-coder commented 5 months ago

Has it been resolved? I also encountered a similar problem