0

Take https://www.instagram.com/instagram as an example. If you click on 'Followers', a list of all the followers is loaded, but only a few are loaded at a time, and you need to continually scroll until all data is loaded.

Is there a way in Javascript to automatically load all the data, or maybe even automate the scrolling for that particular div?

Thanks.

1 Answers1

0

A few things to consider.

The method Instagram is using to show some followers until you scroll to get more is called Infinite scrolling.

Basically, all we have to know is that this method is implemented on the client, that is, in the browser, using JavaScript.

The first solution is: if you can reverse engineer the Instagram code (minified I suppose) and find the good methods to call, you can force fetch new items even if you didn't scroll.

On the other hand, another technique would be to constantly simulate a scroll to the end, I let you refer to this answer on how to.

Community
  • 1
  • 1
Raito
  • 1,553
  • 11
  • 27