Jump to content
UBot Underground

Scraping Instagram Followings From User


Recommended Posts

Before I would used websta.me to scrape followers and followings for a user.  Now I cant do it with that site or the other sites that used to use .  So now I have to use instagram but instagram pops up a window that I have to scroll all the way down to before I can grab the code and parse it.  So is there another website I can use for this to scrape or should I just use instagram and scroll down?

 

All I need to know is how to scroll all the way down. I already know how to parse it with regex.

 

The list is on a popup.  See snapshot.

 

 

post-9583-0-23069900-1487541482_thumb.jpg

Link to post
Share on other sites
https://www.instagram.com/developer/endpoints/users/

a few ways of doing it, can use the socket commands too, can even load the page in your browser

 

you need an access token, can either fill out the application to get one, or simply get one from an alternative site

http://instagram.pixelunion.net/

then simply put this in your browser, replacing user-id with their id and replace the access token at the end, at the top of that developer page theres a few other features like searching names etc, really good stuff

https://api.instagram.com/v1/users/{user-d}/followed-by?access_token=ACCESS-TOKEN
https://api.instagram.com/v1/users/{user-id}/follows?access_token=ACCESS-TOKEN
  • Like 1
Link to post
Share on other sites
https://www.instagram.com/developer/endpoints/users/

a few ways of doing it, can use the socket commands too, can even load the page in your browser

 

you need an access token, can either fill out the application to get one, or simply get one from an alternative site

http://instagram.pixelunion.net/

then simply put this in your browser, replacing user-id with their id and replace the access token at the end, at the top of that developer page theres a few other features like searching names etc, really good stuff

https://api.instagram.com/v1/users/{user-d}/followed-by?access_token=ACCESS-TOKEN
https://api.instagram.com/v1/users/{user-id}/follows?access_token=ACCESS-TOKEN

Thanks @deliter

 

From what I have researched, you cant get users followers anymore. See here: https://www.instagram.com/developer/endpoints/relationships/. Ifinally got my Access token and was able to use the api on for getting info on myself but for everything else you have to add Login Permissions (Scopes).  In order to do that you have to get the app approved.  Is that hard to get approved or am I doing something wrong?

Edited by BigEfromDaBX
  • Like 1
Link to post
Share on other sites

yeah that sucks alright

 

go here

https://elfsight.com/blog/2016/05/how-to-get-instagram-access-token/

 

get the access token, and you'l see in the access panel of your developer console, permission, tick all the boxes, and submit to get granted access,you'l need to give instagram contact information too

Link to post
Share on other sites

done a little research, dude you got to the bottom of that fast, took me an hour before coming to your conclusion, this really sucks about a year ago could make really nice bots with this data, oh well

 

I do however have a code I posted at some point to scroll through a pop up if that might help get the followers, posted some code for scrolling through a Agree to T&C's of a google pop up sometime in the last year

  • Like 1
Link to post
Share on other sites

done a little research, dude you got to the bottom of that fast, took me an hour before coming to your conclusion, this really sucks about a year ago could make really nice bots with this data, oh well

 

I do however have a code I posted at some point to scroll through a pop up if that might help get the followers, posted some code for scrolling through a Agree to T&C's of a google pop up sometime in the last year

 

Hey Deliter.  Thanks for the help anyways.  I found this article http://stackoverflow.com/questions/36265861/instagram-api-get-the-list-of-instagram-users-this-user-is-followed-by that mentioned you couldnt do that anymore.  Sucks big time.  I wanted to do it through the API sooooooo bad lol.  My first API attempt lol.  Its all good.  If you can post the the code to scroll down that popup for me that would be great :)

 

Thanks

Edited by BigEfromDaBX
Link to post
Share on other sites

let me know if this works, works on my browser, dont know if the tags name are generated dynamically

loop(10) {
    run javascript("document.querySelector(\"._4gt3b\").scrollTop +=document.querySelector(\"._4gt3b\").scrollHeight")
    wait(3)
}

click the box for the followers and run this

  • Like 2
Link to post
Share on other sites

did you try this when the dialog pop up was open displaying the follows/followers? just tried logging out clearing cookies, still works

Yes, when the dialog is open....  I tried it with my own followers, and from other profile too, but the window does not scroll.

Link to post
Share on other sites

I tri

 

let me know if this works, works on my browser, dont know if the tags name are generated dynamically

loop(10) {
    run javascript("document.querySelector(\"._4gt3b\").scrollTop +=document.querySelector(\"._4gt3b\").scrollHeight")
    wait(3)
}

click the box for the followers and run this

 

I tried also.  Didnt work for me either.  Tried with both followers and followings popup windows.

Link to post
Share on other sites

try this if this doesnt work in Ubot 5.9 Chrome 49, click view, click web inspector,open the dialog on screen, and click the element selector in the web inspector and click on the top of the dialog, the black border that surrounds it, and  in the element selector under Elements, should start with a role="dialog"

 

right click copy HTML and post it on pastebin the HTML

loop(10) {
    run javascript("document.querySelector(\"[role=\'dialog\'] div:nth-child(2) div div:nth-child(2)\").scrollTop +=document.querySelector(\"[role=\'dialog\'] div:nth-child(2) div div:nth-child(2)\").scrollHeight")
    wait(3)
}

  • Like 2
Link to post
Share on other sites

 

try this if this doesnt work in Ubot 5.9 Chrome 49, click view, click web inspector,open the dialog on screen, and click the element selector in the web inspector and click on the top of the dialog, the black border that surrounds it, and  in the element selector under Elements, should start with a role="dialog"

 

right click copy HTML and post it on pastebin the HTML

loop(10) {
    run javascript("document.querySelector(\"[role=\'dialog\'] div:nth-child(2) div div:nth-child(2)\").scrollTop +=document.querySelector(\"[role=\'dialog\'] div:nth-child(2) div div:nth-child(2)\").scrollHeight")
    wait(3)
}

 

Here you go.  Do we select the class with the red arrow (_q44m8 _7z4zb)  that is the header of that popup or the class right above it (_n3cp9 _qjr85)  which is the whole popup?

post-9583-0-99219800-1487721655_thumb.jpg

Link to post
Share on other sites

Here you go.  Do we select the class with the red arrow (_q44m8 _7z4zb)  that is the header of that popup or the class right above it (_n3cp9 _qjr85)  which is the whole popup?

 

Change browser to Chrome 49 in settings, should work fine, both CSS Selectors will work for that HTML, Luis Carlos got the script working by changing to chrome 49

Link to post
Share on other sites

Change browser to Chrome 49 in settings, should work fine, both CSS Selectors will work for that HTML, Luis Carlos got the script working by changing to chrome 49

 

 

Im always in chrome49.  Didnt work for me.

run javascript("loop(10) \{
    run javascript(\"document.querySelector(\\\"[role=\\\'dialog\\\'] div:nth-child(2) div div:nth-child(2)\\\").scrollTop +=document.querySelector(\\\"[role=\\\'dialog\\\'] div:nth-child(2) div div:nth-child(2)\\\").scrollHeight\")
    wait(3)
\}")

Link to post
Share on other sites

MiriamMB

 

I see your on here, might pass some feedback about this "Daily Quota" for likes, thats pretty unbelievable, Ive often thought nobody likes my posts, maybe they dont, but if you only have around 5 likes a day you cant give away too many, this is deflating to contributors, you like to know your posts are actually being read and appreciated especially when you put some effort into them

  • Like 2
Link to post
Share on other sites

 

Im always in chrome49.  Didnt work for me.

run javascript("loop(10) \{
    run javascript(\"document.querySelector(\\\"[role=\\\'dialog\\\'] div:nth-child(2) div div:nth-child(2)\\\").scrollTop +=document.querySelector(\\\"[role=\\\'dialog\\\'] div:nth-child(2) div div:nth-child(2)\\\").scrollHeight\")
    wait(3)
\}")

the code you posted above certainly doesnt work, that is not what I posted see all the extra back slashes in it \\\

 

dont know how you changed it but copy it again from my original post, and not this broken formatted code above and paste directly into the ubot code editor

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...