I have a script that should open a headless browser, make a search, and take a screenshot.
When I'm running the script with headless: false
, everything works.
When I'm running it with headless: true
, I get blocked by the website (captcha).
I know that there are ways to bypass captchas but that's not what I want.
My question is what's the difference between these 2 modes that the website recognize me as headless browser but when it's not headless it doesn't.
Things I've tried:
- pass chrome check
- pass notification check
- set language header
- insert new user agent and other different args, such as:
'--user-agent=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Safari/537.36',
'--window-size=1920,1080',
'--no-sandbox',
'--disable-gpu',
'--no-zygote',
'--disable-setuid-sandbox',
'--disable-accelerated-2d-canvas',
'--disable-dev-shm-usage'
I'm using latest puppeteer version(10.1.0), 'puppeteer-extra-plugin-stealth' and 'puppeteer-extra'.