miyakogi / pyppeteer

Headless chrome/chromium automation library (unofficial port of puppeteer)
Other
3.56k stars 372 forks source link

How to wait for a Recaptcha to load in Pyppeteer? #277

Open namename-123 opened 4 years ago

namename-123 commented 4 years ago

I want to scrape a website and I'm having difficulties with the Recaptcha. I've already figured out a way to solve it but before that method starts I have to make sure Recaptcha is fully loaded, which is what I'm stuck at. I've tried page.waitForSelector('#captchaFormPart > td:nth-child(2) > script:nth-child(1)', options={'visible': True}) I got that selector from the Recaptcha checkbox, and it didn't work.

MacKey-255 commented 4 years ago

I want to scrape a website and I'm having difficulties with the Recaptcha. I've already figured out a way to solve it but before that method starts I have to make sure Recaptcha is fully loaded, which is what I'm stuck at. I've tried page.waitForSelector('#captchaFormPart > td:nth-child(2) > script:nth-child(1)', options={'visible': True}) I got that selector from the Recaptcha checkbox, and it didn't work.

I recommend using this repository: https://github.com/MacKey-255/GoodByeCatpcha