Created
August 2, 2018 22:56
-
-
Save DanNi0130/cc3f1230ab7b5e31a23d867726be3bba to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// with browserless | |
browser = await puppeteer.connect({ | |
browserWSEndpoint: | |
'ws://' + | |
browserless.ip + | |
':' + | |
browserless.port + | |
'?TOKEN=' + | |
browserless.token + | |
'&--proxy-server=' + proxy + | |
'&--window-size=1920x1080' + | |
'&--no-sandbox=true' + | |
'&--disable-setuid-sandbox=true' + | |
'&--disable-dev-shm-usage=true' + | |
'&--disable-accelerated-2d-canvas=true' + | |
'&--disable-gpu=true' | |
}); | |
// without browserless | |
browser = await puppeteer.launch({ | |
args: [ | |
'--proxy-server=' + proxy, | |
'--no-sandbox', | |
'--disable-setuid-sandbox', | |
'--disable-dev-shm-usage', | |
'--disable-accelerated-2d-canvas', | |
'--disable-gpu', | |
'--window-size=1920x1080', | |
], | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment