@mihnea.dev/puppeteer-extra-amazon-captcha
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

ProxyShare.io - 4G Mobile Proxies

Puppeteer Extra Amazon Captcha Plugin

A simple puppeteer-extra plugin, made possible with Tessaract.js.

preview

Note: This plugin is still under development and has not been tested in production.

Installation

npm i @mihnea.dev/puppeteer-extra-amazon-captcha

Usage

import AmazonCaptchaPlugin from "@mihnea.dev/puppeteer-extra-amazon-captcha";
import puppeteer from 'puppeteer-extra';
try {
    const amazonCaptchaPlugin = AmazonCaptchaPlugin.default();
    puppeteer.use(amazonCaptchaPlugin);
    const browser = await puppeteer.launch({
        headless: false,
        ignoreHTTPSErrors: true,
    });
    const page = await browser.newPage();
    await page.goto("https://www.amazon.com/errors/validateCaptcha");
    /** Important: Delay code execution until URL no longer includes "error" */
    await page.waitForFunction(() => !window.location.href.includes("error"));
    await page.close();
    await browser.close();
} catch (e) {
    console.log("Error launching puppeteer: " + e.message)
}

License

Copyright © 2023, Mihnea Manolache. Released under the MIT License.

Package Sidebar

Install

npm i @mihnea.dev/puppeteer-extra-amazon-captcha

Weekly Downloads

10

Version

1.0.3

License

MIT

Unpacked Size

8.9 kB

Total Files

7

Last publish

Collaborators

  • mihnea.dev