Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
600 views
in Technique[技术] by (71.8m points)

node.js - How can I use puppeteer-extra-plugin-recaptcha to resolve captcha in an iframe?

I am trying to get information from a property websites using puppeteer and a proxy but the site is still detecting me as a bot and then I am blocked on a captcha in an iframe. I used on other websites and was able to retrieve the data I want.

const puppeteer = require('puppeteer-extra');
const StealthPlugin = require('puppeteer-extra-plugin-stealth');
puppeteer.use(StealthPlugin());
const RecaptchaPlugin = require('puppeteer-extra-plugin-recaptcha');

But I cannot detect the recaptcha for https://www.seloger.com/ when trying to solve the recaptcha. I tried to give the frame and the page as parameter but it still cannot detect it.

Does anyone have any idea ?

await page.goto( url, { timeout: 60000,waitUntil: [ "domcontentloaded" ] } );
await page.waitFor(4000);
await page.screenshot({ path: (nom.concat('_a',i,'.png')), fullPage: true });

var items = await page.$("iframe");
var frame = await items.contentFrame();


try {
    await frame.solveRecaptchas();
    await Promise.all([
        page.waitForNavigation(),
    ]);
}
catch (e) {
    console.log('no recaptcha found');
}
await page.waitForNavigation(),

Thanks you for your help

question from:https://stackoverflow.com/questions/65541054/how-can-i-use-puppeteer-extra-plugin-recaptcha-to-resolve-captcha-in-an-iframe

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...