I tried to run a simple code to extract data from Instagram using Python-Instagram module
The code is
from instagram.client import InstagramAPI
api = InstagramAPI(client_id='YOUR_CLIENT_ID',client_secret='YOUR_CLIENT_SECRET')
popular_media = api.media_popular(count=20)
I am getting a Connection refused
error at the last lineline. Its because Python-Instagram
module uses httplib2
module also. The error looks like this.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/anaconda/lib/python2.7/site-packages/httplib2-0.9-py2.7.egg/httplib2/__init__.py", line 1060, in connect
raise socket.error, msg
socket.error: [Errno 111] Connection refused
How to resolve this? Do I have to provide any connection specifications for using this module?