Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Python 

IG followers Scrapper

I really want to make a python script that will scrape Instagram followers and store them in .txt file.
The problem is I don't know where to begin. Since you can now check the followers/followings of a user in a browser I'm thinking this is going to fall under web scrapping or I have to resort to the Instagram API?.

Haven't done web scrapping or api programming before but I know the basics of the Python language really well I just need to know where to start and I will take it from there.
Probably start here:

python-instagram

This will require you to install python-instagram... like so:

PHP Code

<?php 
pip install python
-instagram 

Afterwards, the documentations is linked on the github page above!

Hope I helped!

- Ewil
(Mar 27, 2016 08:21 AM)EwilDave Wrote:  Probably start here:

python-instagram

This will require you to install python-instagram... like so:

PHP Code

<?php 
pip install python
-instagram 

Afterwards, the documentations is linked on the github page above!

Hope I helped!

- Ewil

That means I have to go with Instagram API.
I can't even get the example code to work

PHP Code

<?php 
from instagram
.client import InstagramAPI

api 
= InstagramAPI(client_id='YOUR_CLIENT_ID', client_secret='YOUR_CLIENT_SECRET')
popular_media = api.media_popular(count=20)
for 
media in popular_media:
    print 
media.images['standard_resolution'].url 

What I did?
I Registered a new client at https://www.instagram.com/developer
Replaced the client_id and client_secret with my client info and i get this error message

PHP Code

<?php 
Traceback 
(most recent call last):
  
File "C:\AutoPy\test.py", line 7, in <module>
    
popular_media = api.media_popular(count=20)
  
File "H:\Python27\lib\site-packages\instagram\bind.py", line 197, in _call
    
return method.execute()
  
File "H:\Python27\lib\site-packages\instagram\bind.py", line 189, in execute
    content
, next = self._do_api_request(url, method, body, headers)
  
File "H:\Python27\lib\site-packages\instagram\bind.py", line 131, in _do_api_request
    raise InstagramClientError
('Unable to parse response, not valid JSON.', status_code=response['status'])
InstagramClientError: (404) Unable to parse response, not valid JSON. 


Possibly Related Threads...
Thread / Author Replies Views Last Post
[.NET] by SaladOct 27, 2015 11:47 PM 10 679 Oct 27, 2015 11:47 PM
Last Post: SIM-1676753
[.NET] by ~xXx~Jun 25, 2014 01:49 PM 23 674 Jun 25, 2014 01:49 PM
Last Post: SIM-1676753
[Python] by FurtivusMay 27, 2014 06:05 PM 2 122 May 27, 2014 06:05 PM
Last Post: TheBeast808