19 lines
365 B
JavaScript
19 lines
365 B
JavaScript
// npm install https://github.com/GoogleChrome/puppeteer/
|
|
|
|
const puppeteer = require('puppeteer');
|
|
|
|
(async () => {
|
|
|
|
const url = process.argv[2];
|
|
const browser = await puppeteer.launch();
|
|
const page = await browser.newPage();
|
|
|
|
await page.goto(url, {waitUntil: 'load'});
|
|
|
|
const html = await page.content();
|
|
|
|
browser.close();
|
|
console.log(html);
|
|
|
|
})();
|