diff options
author | rain <rain@puddle.local> | 2023-08-18 13:14:26 -0500 |
---|---|---|
committer | rain <rain@puddle.local> | 2023-08-18 13:14:26 -0500 |
commit | b049a47d9fbc1444ec0bc0e48a5ee681206cbaf4 (patch) | |
tree | 5da661f93ef10aae2ce38b496a41fabc67ca31db | |
parent | c5b9b8ac465b430361d253fe558ffb505b27e182 (diff) |
Fixed issue with image verification paths as a result of changes to implement #1main
-rwxr-xr-x | snappy.js | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -139,16 +139,17 @@ async function run() { for(var i = 0;i<sites.length;i++){ let site = validateUrl(sites[i]); let imageName = urlToFilename(site); + let fullImagePath = argv.o + imageName //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: argv.o + imageName}).then(async () => { + await page.screenshot({path: fullImagePath}).then(async () => { if(!argv.v) return; - const res = await verifyImage(imageName); + const res = await verifyImage(fullImagePath); if(res) fs.appendFileSync(argv.v, `${site}\n`); }); |