mirror of
https://github.com/vladocar/screenshoteer.git
synced 2025-01-03 11:32:11 +01:00
commit
eb1dfc8f21
1 changed files with 1 additions and 2 deletions
3
index.js
3
index.js
|
@ -28,7 +28,6 @@ console.log(program.url);
|
||||||
console.log(program.fullPage);
|
console.log(program.fullPage);
|
||||||
|
|
||||||
(async () => {
|
(async () => {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await execute();
|
await execute();
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
|
@ -50,6 +49,7 @@ console.log(program.fullPage);
|
||||||
await page.emulate(devices[program.emulate]);
|
await page.emulate(devices[program.emulate]);
|
||||||
else
|
else
|
||||||
program.emulate = '';
|
program.emulate = '';
|
||||||
|
|
||||||
if (program.auth) {
|
if (program.auth) {
|
||||||
const [username, password] = program.auth.split(';');
|
const [username, password] = program.auth.split(';');
|
||||||
await page.authenticate({ username, password });
|
await page.authenticate({ username, password });
|
||||||
|
@ -68,5 +68,4 @@ console.log(program.fullPage);
|
||||||
console.log(title);
|
console.log(title);
|
||||||
await browser.close();
|
await browser.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
})()
|
})()
|
||||||
|
|
Loading…
Reference in a new issue