diff options
author | rain <rain@puddle.local> | 2023-07-31 10:08:28 -0500 |
---|---|---|
committer | rain <rain@puddle.local> | 2023-07-31 10:08:28 -0500 |
commit | fe0b515f37fde090c870a5c01797dadf8f14ac5d (patch) | |
tree | 6c359dd6759a6ab7b1840b3871c2a0126217e292 /snappy.js | |
parent | b66c59b4b1dc200e12365265bd2b01e77d4dbc92 (diff) |
Added extra delay cmdline arg for those weird slow websites
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; |