mirror of
https://github.com/FlareSolverr/FlareSolverr.git
synced 2025-06-08 04:25:25 +00:00
26 lines
649 B
TypeScript
26 lines
649 B
TypeScript
const solveCaptcha = require('hcaptcha-solver');
|
|
import { SolverOptions } from '.'
|
|
/*
|
|
This method uses the hcaptcha-solver project:
|
|
https://github.com/JimmyLaurent/hcaptcha-solver
|
|
|
|
TODO: allow user pass custom options to the solver.
|
|
|
|
ENV:
|
|
There are no other variables that must be set to get this to work
|
|
*/
|
|
|
|
export default async function solve({ url }: SolverOptions): Promise<string> {
|
|
throw new Error("hcaptcha-solver is not able to solve the new hCaptcha challenge. This issue is already reported #31.");
|
|
|
|
/*
|
|
try {
|
|
return await solveCaptcha(url)
|
|
} catch (e) {
|
|
console.error(e)
|
|
return null
|
|
}
|
|
*/
|
|
|
|
}
|