website-scraper / website-scraper-puppeteer

Plugin for website-scraper which returns html for dynamic websites using puppeteer
MIT License
323 stars 79 forks source link

How to run "Usage"? #84

Closed littabird closed 10 months ago

littabird commented 10 months ago

I have install 'website-scraper' & 'website-scraper-puppeteer'. But Command Prompt couldn't run the "Usage" as below:-

========

import scrape from 'website-scraper'; import PuppeteerPlugin from 'website-scraper-puppeteer';

await scrape({ urls: ['https://www.instagram.com/gopro/'], directory: '/path/to/save', plugins: [ new PuppeteerPlugin({ launchOptions: { headless: "new" }, / optional / gotoOptions: { waitUntil: "networkidle0" }, / optional / scrollToBottom: { timeout: 10000, viewportN: 10 }, / optional / blockNavigation: true, / optional / }) ] });


How do I run this thing?

aivus commented 10 months ago

Hello @littabird 👋

This nodejs module doesn't work from CLI out of the box.