diff options
Diffstat (limited to 'snappy.js')
-rwxr-xr-x | snappy.js | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -25,6 +25,7 @@ if(argv.h){ ["-i", "<File with a list of websites>"], ["-w", "<Windows Size, Default:1280x720>"], ["-v", "<Check if screenshots are blank and output to...>"], + ["-t", "Add additional delay to screenshots (Seconds)"], ["-p", "<SOCKS5 Proxy Port>"] ]; @@ -134,6 +135,8 @@ async function run() { //await page.goto(site, { waitUntil: 'domcontentloaded' }); //await timeout(5000); //This can be used to REALLY slow down and wait for pages to load await page.goto(site, { waitUntil: 'networkidle2' }).then(async () => { + let userTimeout = parseInt(argv.t); + await timeout(isNaN(userTimeout)?0:userTimeout*1000); await page.screenshot({path: imageName}).then(async () => { if(!argv.v) return; |