-
-
Notifications
You must be signed in to change notification settings - Fork 772
Using Google Chrome instead of Chromium
berstend̡̲̫̹̠̖͚͓̔̄̓̐̄͛̀͘ edited this page Nov 3, 2020
·
4 revisions
- Chromium is the open-source browser that Google's Chrome browser is based on
- By default puppeteer and playwright will use the Chromium browser they ship with
- For extra stealthiness it's advised to use a regular Google Chrome browser instead
- The biggest difference is proprietary codec support which is missing in Chromium, that a website can test for
Example (Linux/Docker):
const puppeteer = require('puppeteer')
puppeteer
.launch({ executablePath: '/usr/bin/google-chrome', args: ['--no-sandbox'] }).then(async browser => {
const page = await browser.newPage()
await page.goto('https://w3c-test.org/media-source/mediasource-is-type-supported.html')
console.log(await page.evaluate(() => MediaSource.isTypeSupported('audio/aac')))
console.log(await (await (await page.$('#summary')).getProperty('textContent')).jsonValue())
await browser.close()
})
Use executablePath
to point to your Google Chrome (or Canary) binary.
If you're running puppeteer on your Desktop you can find out the path of your regular browser by navigating to chrome://version/
and looking at the Executable Path
entry, for example:
/Applications/Google Chrome.app/Contents/MacOS/Google Chrome