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 / http://facebook.com/jamesbond
write one yourselfâŚI will give you something to help you get started using python + selenium.
from selenium import webdriver
browser=webdriver.Firefox()
_#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:
browser.get(âhttps://www.instagram.com/{}â.format(username))
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(" ")]
print(username+â/â+url)
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)