3 ms·
As a followup, if you have the ability to modify the Chrome/Chromium command line arguments, using the following option completely fools the detection: --lan
by jadell 7y ago
As a followup, if you have the ability to modify the Chrome/Chromium command line arguments, using the following option completely fools the detection:
--lang=en-US,en;q=0.9
You can prove this with the following Puppeteer script:
(async () => {
const puppeteer = require('puppeteer');
const browserOpts = {
headless: true,
args: [
'--no-sandbox',
'--disable-setuid-sandbox',
'--user-agent=Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3803.0 Safari/537.36',
// THIS IS THE KEY BIT!
'--lang=en-US,en;q=0.9',
],
};
const browser = await puppeteer.launch(browserOpts);
const page = await browser.newPage();
await page.goto('https://arh.antoinevastel.com/bots/areyouheadless');
await page.screenshot({ path: 'areyouheadless.png' });
await browser.close();
})();