Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jacoblincool/recaptcha-solver
Solve reCAPTCHA challenges by using offline speech recognition.
https://github.com/jacoblincool/recaptcha-solver
automation playwright recaptcha
Last synced: 23 days ago
JSON representation
Solve reCAPTCHA challenges by using offline speech recognition.
- Host: GitHub
- URL: https://github.com/jacoblincool/recaptcha-solver
- Owner: JacobLinCool
- License: mit
- Created: 2022-07-28T14:39:15.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-25T01:24:22.000Z (7 months ago)
- Last Synced: 2024-12-24T05:08:00.306Z (23 days ago)
- Topics: automation, playwright, recaptcha
- Language: TypeScript
- Homepage:
- Size: 1.11 MB
- Stars: 30
- Watchers: 4
- Forks: 14
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# reCAPTCHA Solver
Solve reCAPTCHA challenges by using offline speech recognition.
> It can be very useful when you want to do E2E tests with your application protected by reCAPTCHA.
Requirements:
- `ffmpeg` installed
Features:
- Offline: A pretrained small model is included.
- Fast: Solve each challenge in less than 3 seconds.
- Accurate: Over 95% accuracy.
- Auto-retry: If the challenge is not solved, it will retry it.
- Supports reCAPTCHA v2 and v3 (invisible).## Install
```sh
npm i recaptcha-solver
```It will automatically download a 40 MB acoustic model which will be used to solve the challenges.
The model is from (Apache 2.0).
## Example
Checkout [`example/index.mjs`](example/index.mjs)!
```js
import { chromium } from "playwright-core";
import { solve } from "recaptcha-solver";const EXAMPLE_PAGE = "https://www.google.com/recaptcha/api2/demo";
main();
async function main() {
const browser = await chromium.launch({ headless: false });
const page = await browser.newPage();
await page.goto(EXAMPLE_PAGE);console.time("solve reCAPTCHA");
await solve(page);
console.log("solved!");
console.timeEnd("solve reCAPTCHA");await page.click("#recaptcha-demo-submit");
page.on("close", async () => {
await browser.close();
process.exit(0);
});
}
``````sh
❯ node example/index.mjs
solved!
solve reCAPTCHA: 4.285s
```With `VERBOSE` environment variable:
```sh
❯ VERBOSE=1 node example/index.mjs
[reCAPTCHA solver] bframe loaded: false
[reCAPTCHA solver] invisible: false
[reCAPTCHA solver] action required: true
[reCAPTCHA solver] [Mutex] init locked
[reCAPTCHA solver] [Mutex] ready waiting
[reCAPTCHA solver] [Mutex] get sound unlocked
[reCAPTCHA solver] [Mutex] ready locked
[reCAPTCHA solver] reconized: for their start urine
[reCAPTCHA solver] [Mutex] done waiting
[reCAPTCHA solver] [Mutex] verified unlocked
[reCAPTCHA solver] [Mutex] done locked
[reCAPTCHA solver] passed: true
solved!
solve reCAPTCHA: 4.072s
```### Demo
[demo.mp4 (23s)](example/demo.mp4)
https://user-images.githubusercontent.com/28478594/181560802-a6be4c0f-3258-4cd6-b605-3d9671b04a8f.mp4