Skip to content

Instantly share code, notes, and snippets.

@mizvol
Created April 21, 2017 10:53
Show Gist options
  • Save mizvol/d9d1b033456e6d75ce16424bc2520cc0 to your computer and use it in GitHub Desktop.
Save mizvol/d9d1b033456e6d75ce16424bc2520cc0 to your computer and use it in GitHub Desktop.
def getFollowers(userId, nextCursor):
params = {
'cursor': nextCursor,
'access_token': INSTAGRAM_ACCESS_TOKEN
}
session = Session()
session.mount("https://", adapters.HTTPAdapter(max_retries=50))
response = session.get("https://api.instagram.com/v1/users/" + userId + "/followed-by", params = params, verify = True)
return response.json()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment