Instagram URL's scraper

Hi there guys,

Can anyone suggest the Instagram scraper which can help to grab links from profiles? I mean I need the output like
Instagram username/URL which user put in his link field.
For example, jamesbond /

Any help would be much appreciated! :slight_smile:

write one yourself…I will give you something to help you get started using python + selenium.

from selenium import webdriver

_#you need to give this loop a userlist or find a way to implement something that will walk _
#around instagram depending on if you have a targeted audience
for username in userList:
bio=browser.execute_script(“return window._sharedData.entry_data.ProfilePage[0].graphql.user.biography”)
if ‘http’ in bio:
url = bio[bio.find(“http://”):]
url = t[:t.find(" ")]

Above code is just something I put together quickly so not tested but you get the idea. You will need to fill in some blanks, like error handling if you can’t get the ig page for any particular user (eg account no longer valid, you are looping too fast and hit some IG rate limit, etc)

1 Like

also this forum’s text formatter removed all my python loop and if indentations :face_with_raised_eyebrow:

1 Like

Try Octoparse Task template.