mercredi 19 juin 2019

Chrome infinite scroll - random delay / movement

I would like to be able to scroll to the bottom of a really long infinite scrolling page in Chrome using developer tools – but as several sites recognize this and block further scrolling, I would like to get as close to human behavior as possible.

Using the code below, would it be be possible to add a random delay and possibly opposite movement now and again? or any other ideas to avoid detection?

var lastScrollHeight = 0;
    function autoScroll() {
      var sh = document.documentElement.scrollHeight;
      if (sh != lastScrollHeight) {
        lastScrollHeight = sh;
        document.documentElement.scrollTop = sh;
      }
    }
    window.setInterval(autoScroll, 100);




Aucun commentaire:

Enregistrer un commentaire