This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const CDP = require('chrome-remote-interface'); | |
| const argv = require('minimist')(process.argv.slice(2)); | |
| const file = require('fs'); | |
| // CLI Args | |
| const url = argv.url || 'https://www.google.com'; | |
| const format = argv.format === 'jpeg' ? 'jpeg' : 'png'; | |
| const viewportWidth = argv.viewportWidth || 1440; | |
| const viewportHeight = argv.viewportHeight || 900; | |
| const delay = argv.delay || 0; |