I am newbie to Instagram Api. I am trying to figure out how to set proxy for InstagramApi using Python. Below is the basic code which I got from github. When I executed this code I got an error. I think I need to include proxy server.
How can I include a proxy server in this?
from instagram.client import InstagramAPI
access_token="*******************************"
client_secret="******************************"
api = InstagramAPI(access_token=access_token, client_secret=client_secret)
recent_media, next_ = api.user_recent_media(user_id="jey07", count=4)
for media in recent_media:
print(media.caption.text)
I am getting below error:
File "C:\Users\Gabriel\AppData\Local\Programs\Python\Python36\lib\socket.py", line 713, in create_connection
sock.connect(sa)
ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it