L
L
Lord_Dantes2020-02-17 14:41:33
PHP
Lord_Dantes, 2020-02-17 14:41:33

How to scroll a page or load more data on a site?

There is a script which receives links to pictures, and now receives only 12 links.
The place (instagram) where he gets them from has a lot of links.
When loading the script, it receives only 12 links, although I did not set any conditions in the number.

The script does not load all the links because Instagram only loads the first 12, it seems to me that I need to write a function to load the page or view it to the "end" but how to do this?
Can you please tell me a link to an article or an example of a similar code, if any, thanks.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
nokimaro, 2020-02-20
@Lord_Dantes

You can use this library https://github.com/postaddictme/instagram-php-scraper
Under the hood scraping the web version of instagram.
Getting a list of account posts can be done without authorization, and the paging function is present
. You may also need a proxy to change ip, since if you parse data often and actively, then blocking by ip is guaranteed.
An example of getting a list of photos by username
https://github.com/postaddictme/instagram-php-scra...

S
Sergey Shvyrev, 2020-02-18
@CellycoMobiles

Not necessary. It's most likely pagination. See what request goes to the server when scrolling the page. Change the parameters of this request and the next batch of images will be returned to you.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question