Infinite scroll instagram

Hi,

I have working for some time now to scrape some instagram urls of users which use a certain tag.

However i'm not getting the instagram inifite scroll working.
The tool bounces twices and then start generating results.

Url: https://www.instagram.com/explore/tags/winter/

Sitemap:
{"_id":"tester","startUrl":["https://www.instagram.com/explore/tags/winter/"],"selectors":[{"id":"scroll","type":"SelectorElementScroll","parentSelectors":["_root"],"selector":"article","multiple":true,"delay":"5500"},{"id":"postclick","type":"SelectorLink","parentSelectors":["scroll"],"selector":"> div > div > div.Nnq7C a","multiple":true,"delay":"1500"}]}

thanks for your help.

Hi all, anyone got the missing trick?

it seems that the elementscroll, stops to early and so it wont load more items.

Your selector is too specific, and instagram is using random selector names like div.Nnq7C, probably as an anti-scraper measure.

Something like div[style^='flex']:nth-of-type(-n+60) > div > div > a
should work better.

This will limit it to the first 60. You can increase the number in -n+60 if you need more.

1 Like

Hello @leemeng where can I find the correct selector name like the one you shared