mirror of
https://github.com/comatory/fb2iCal
synced 2024-12-29 09:50:55 +01:00
16 lines
309 B
JavaScript
16 lines
309 B
JavaScript
const puppeteer = require('puppeteer')
|
|
|
|
const crawl = async (url) => {
|
|
const browser = await puppeteer.launch()
|
|
const page = await browser.newPage()
|
|
await page.goto(url)
|
|
|
|
const html = await page.evaluate(() => document.body.innerHTML)
|
|
|
|
await browser.close()
|
|
|
|
return html
|
|
}
|
|
|
|
module.exports = crawl
|