Advertisement
dereksir

Untitled

Apr 16th, 2024
2,317
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import puppeteer from 'puppeteer';
  2.  
  3. (async () => {
  4.   // launch the browser and open a new blank page
  5.   const browser = await puppeteer.launch();
  6.   const page = await browser.newPage();
  7.  
  8.   // navigate the page to a URL
  9.   await page.goto('https://www.kickz.com/de');
  10.  
  11.   // set screen size
  12.   await page.setViewport({width: 1080, height: 1024});
  13.  
  14.   // take screenshot  
  15.   await page.screenshot({ path: 'kickz.png' });
  16.  
  17.   await browser.close();
  18. })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement