Creates a new instance of CaptchaDetector.
Optional configuration for the detector
Internal
Analyzes HTML content to detect captcha types. This method is exposed for testing purposes and direct HTML analysis.
The HTML content to analyze
The detected CaptchaType or null if none found
Detects the type of captcha present on a given URL.
This method fetches the HTML content from the specified URL and analyzes it to identify captcha implementations. It supports proxy usage and handles Single Page Applications (SPAs) by waiting for initial content to load.
The URL to analyze for captcha presence
Optional
proxy: ProxyOptionsOptional proxy configuration for the HTTP request
Promise that resolves to the detected CaptchaType or null if none found
Utility class for automatically detecting the type of captcha present on a webpage.
This class can analyze HTML content to identify common captcha implementations including Google reCAPTCHA v2/v3 and hCaptcha by looking for specific patterns, scripts, and DOM elements.
Example