-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.mjs
30 lines (25 loc) · 909 Bytes
/
app.mjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// import scrape from 'website-scraper'; // only as ESM, no CommonJS
// // const scrape = require('website-scraper'); // CommonJS only
// const options = {
// urls: ['https://massive-number-496753.framer.app/'],
// directory: './opium'
// };
// // with async/await
// // const result = await scrape(options);
// // with promise
// scrape(options).then((result) => {});
import scrape from 'website-scraper';
import PuppeteerPlugin from 'website-scraper-puppeteer';
await scrape({
urls: ['https://massive-number-496753.framer.app/'],
directory: './opium',
plugins: [
new PuppeteerPlugin({
launchOptions: { headless: false }, /* optional */
scrollToBottom: { timeout: 10000, viewportN: 20 }, /* optional */
blockNavigation: false, /* optional */
isMobile: false, /* optional */
defaultViewport: null
}),
],
});