Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mihneamanolache/puppeteer-extra-amazon-captcha
A puppeteer-extra plugin to solve Amazon captchas using Tessaract.JS.
https://github.com/mihneamanolache/puppeteer-extra-amazon-captcha
Last synced: 9 days ago
JSON representation
A puppeteer-extra plugin to solve Amazon captchas using Tessaract.JS.
- Host: GitHub
- URL: https://github.com/mihneamanolache/puppeteer-extra-amazon-captcha
- Owner: mihneamanolache
- License: mit
- Created: 2023-10-20T19:31:23.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-05-16T08:16:14.000Z (6 months ago)
- Last Synced: 2024-11-01T10:05:53.814Z (14 days ago)
- Language: TypeScript
- Size: 97.7 KB
- Stars: 10
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![ProxyShare.io - 4G Mobile Proxies](https://github.com/mihneamanolache/puppeteer-extra-amazon-captcha/assets/43548656/c3efa5c2-848c-4c21-a184-c0190e6d6f35)](https://www.proxyshare.io/)
# Puppeteer Extra Amazon Captcha Plugin
A simple [`puppeteer-extra`](https://github.com/berstend/puppeteer-extra/tree/master) plugin, made possible with [Tessaract.js](https://github.com/naptha/tesseract.js).![preview](https://github.com/mihneamanolache/puppeteer-extra-amazon-captcha/assets/43548656/46c1b13f-f319-471b-9887-7cf3aec0b51e)
*Note: This plugin is still under development and has not been tested in production.*
## Installation
```bash
npm i @mihnea.dev/puppeteer-extra-amazon-captcha
```## Usage
```js
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](https://github.com/mihneamanolache/). Released under the MIT License.