Hcaptcha bypass
If you've been around the internet recently you might have come across this new kind of captcha named hcaptcha.
But if you want to know a little trick to bypass them using puppeteer keep reading!
This captcha uses WebAssembly and other new APIs from HTML5 to detect if the browser is being controlled. But the thing is, we all know very well that this is literally impossible!
So instead of using the old puppeteer.launch
method to start your automation you would need just a little more work to get things done.
The --remote-debugging-port flag
As described by peter.sh when it's used it "Enables remote debug over HTTP on the specified port.".
chrome --remote-debugging-port=12345
If you want to always run chrome using this flag, click here
The puppeteer.connect method
This methods attaches Puppeteer to an existing browser instance. There is extensive documentation about it over here.
const puppeteer = require('puppeteer')
const browser = await puppeteer.connect({
browserURL: 'http://127.0.0.1:12345'
})
Using this method I was able to bypass hcaptcha and solve my problem!
dptoledo@pm.me