Launch Week Day 1: Socket for Jira Is Now Available.Learn More
Socket
Book a DemoSign in
Socket

website-scraper-puppeteer

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

website-scraper-puppeteer

Plugin for website-scraper which returns html for dynamic websites using puppeteer

latest
Source
npmnpm
Version
2.0.0
Version published
Weekly downloads
367
-44.56%
Maintainers
1
Weekly downloads
 
Created
Source

Version Downloads Node.js CI Code Coverage

website-scraper-puppeteer

Plugin for website-scraper which returns html for dynamic websites using puppeteer.

Sponsors

Maintenance of this project is made possible by all the contributors and sponsors. If you'd like to sponsor this project and have your avatar or company logo appear below click here. 💖

User avatar: Illia AntypenkoUser avatar: Pascal BirchlerUser avatar: Carlos RufoUser avatar: Francesca MaranoUser avatar: GitHubUser avatar: Andrew VorobiovUser avatar: User avatar:

Requirements

  • nodejs version >= 20
  • website-scraper version >= 5

Installation

npm install website-scraper website-scraper-puppeteer

Usage

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 */
      })
    ]
});

Puppeteer plugin constructor accepts next params:

  • launchOptions - (optional) - puppeteer launch options, can be found in puppeteer docs
  • gotoOptions - (optional) - puppeteer page.goto options, can be found in puppeteer docs
  • scrollToBottom - (optional) - in some cases, the page needs to be scrolled down to render its assets (lazyloading). Because some pages can be really endless, the scrolldown process can be interrupted before reaching the bottom when one or both of the bellow limitations are reached:
    • timeout - in milliseconds
    • viewportN - viewport height multiplier

How it works

It starts Chromium in headless mode which just opens page and waits until page is loaded. It is far from ideal because probably you need to wait until some resource is loaded or click some button or log in. Currently this module doesn't support such functionality.

Keywords

website-scraper

FAQs

Package last updated on 30 Oct 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts