summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsnappy.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/snappy.js b/snappy.js
index a9a136b..59ced51 100755
--- a/snappy.js
+++ b/snappy.js
@@ -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;