New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

puppeteer-autoscroll-down

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

puppeteer-autoscroll-down

Handle infinite scroll on websites by puppeteer

  • 0.1.6
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2.9K
decreased by-26.59%
Maintainers
1
Weekly downloads
 
Created
Source

Handle infinite scroll on websites by puppeteer

We use window.scrollBy method for scrolling pages.

Usage

const browser = await puppeteer.launch()
const page = await browser.newPage()
await page.goto(SOME_URL)

const lastPosition = await scrollPageToBottom(page)

await browser.close()

You can use returned value with request/response hooks to handle async content uploading.

Scrolling options

scrollStep - Number of pixels to scroll on each step.

scrollDelay - A delay between each scroll step in ms.

const scrollStep = 250 // default
const scrollDelay = 100 // default
const lastPosition = await scrollPageToBottom(page, scrollStep, scrollDelay)

Install

npm i puppeteer-autoscroll-down

or

yarn add puppeteer-autoscroll-down

Contributing

Feel free to ask or open an issue.

Keywords

FAQs

Package last updated on 22 Jul 2020

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc