This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

puppeteer-extra-plugin-captchaai

1.0.1 • Public • Published

puppeteer-extra-plugin-captchaai


⬇️ Install

npm i puppeteer puppeteer-extra puppeteer-extra-plugin-captchaai

Usage

  1. Import and use within puppeteer-extra.

     const puppeteer = require('puppeteer-extra');
     const CaptchaaiPlugin = require('puppeteer-extra-plugin-captchaai')();
     
     puppeteer.use(CaptchaaiPlugin);
  2. .setHandler('apikey', verbose) - at the top of your script.

Set your apikey in order to request solving tasks.

 CaptchaaiPlugin.setHandler('CAI-XXX...', 1); // debug tasks: 1 or 2

📖 Handler / Solving API Wrapper

  • Handler it's based on captchaai-npm (nodejs api wrapper for captchaai.io api).

  • Retrieve the currently handler:

const handler = CaptchaaiPlugin.handler()

example: retrieve handler and call for funcaptcha token.

//  
await CaptchaaiPlugin.handler()
  .funcaptchaproxyless(websiteURL, websitePublicKey, funcaptchaApiJSSubdomain)
  .then((response) => {
    if(response.error !== 0){ 
        const token = response.apiResponse.solution;
    }else{ 
        const token = null; 
        console.log('[myapp][got error]' + JSON.stringify(response.apiResponse))
    }  
  }).catch(e => {
      console.log(e);
  })

🖱 Extra DOM Features

  • [x] await CaptchaaiPlugin.hcaptchaclicker(page) - handle a page including hcaptcha iframe and trigger it, then emulates human clicks. example script (how to use).
puppeteer.launch({ headless: false })
.then(async browser => {
    let page = await browser.newPage();
    await page.goto(targeturl);
    await CaptchaaiPlugin.hcaptchaclicker(page, true)
    .then(async (page) => {
        // handle clicker success
        await page.click('#submit');
        await page.waitForNavigation();
    }).catch((e) => {
        // handle clicker error
        console.log(e);
    });

})

  • [ ] hcaptcha callback.
  • [ ] funcaptcha clicker.
  • [ ] funcaptcha callback.

📁 Examples

figure out at examples directory

Package Sidebar

Install

npm i puppeteer-extra-plugin-captchaai

Weekly Downloads

0

Version

1.0.1

License

ISC

Unpacked Size

17.1 kB

Total Files

5

Last publish

Collaborators

  • qwertyy__