Scroll Slowly to Bottom

Premades & Resources to be used with Helium Scraper 3
Post Reply
webmaster
Site Admin
Posts: 507
Joined: Mon Dec 06, 2010 8:39 am
Contact:

Scroll Slowly to Bottom

Post by webmaster » Thu Nov 19, 2020 8:11 pm

There are pages where the content won't load until we scroll down to where the content is located, and scrolling all the way to the bottom of the page at once sometimes fails to load the content. This premade scrolls slowly to the bottom of the page so all content is loaded.

It takes a speed argument, which sets the number of pixels to scroll per second and defaults to 2500. To use this on your project, follow these instructions.

Code: Select all

function (speed)
   State.Child
      ·  Browser.RunScript
            ·  "var e=null,o=()=>{var n=document.documentElement.scrollTop;document.documentElement.scrollTop+=argument/100,n<document.documentElement.scrollTop?setTimeout(o,10):e()};return setTimeout(o,10),new Promise(o=>e=o)"
            ·  speed
Juan Soldi
The Helium Scraper Team

Post Reply