ぼざクリ タグ広場 https://hub.nizika.monster
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

19 lines
498 B

  1. const puppeteer = require ('puppeteer')
  2. const fs = require ('fs')
  3. void (async () => {
  4. const url = process.argv[2]
  5. const output = process.argv[3]
  6. const browser = await puppeteer.launch ({
  7. args: ['--no-sandbox', '--disable-setuid-sandbox'] })
  8. const page = await browser.newPage ()
  9. await page.setViewport ({ width: 960, height: 960 })
  10. await page.goto (url, { waitUntil: 'networkidle2', timeout: 10000 })
  11. await page.screenshot ({ path: output })
  12. await browser.close ()
  13. }) ()