Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
puppeteer-extra-plugin-captchaai
Advanced tools
A puppeteer-extra plugin to interact/solve with API.
npm i puppeteer puppeteer-extra puppeteer-extra-plugin-captchaai
Import and use within puppeteer-extra
.
const puppeteer = require('puppeteer-extra');
const CaptchaaiPlugin = require('puppeteer-extra-plugin-captchaai')();
puppeteer.use(CaptchaaiPlugin);
.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 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);
})
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);
});
})
figure out at examples directory
FAQs
A puppeteer-extra plugin to interact/solve with API.
We found that puppeteer-extra-plugin-captchaai demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.