Skip to content

Instantly share code, notes, and snippets.

@techinpark2
Created June 18, 2014 03:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save techinpark2/044bf70a201ad20deb2a to your computer and use it in GitHub Desktop.
Save techinpark2/044bf70a201ad20deb2a to your computer and use it in GitHub Desktop.
InstaAuto.py
import urllib
import json
target_url = "https://api.instagram.com/v1/tags/%EC%85%80%EC%B9%B4/media/recent?access_token=[YOUR_ACCESS_TOKEN_HERE]"
handle = urllib.urlopen(target_url)
data = handle.read()
json = json.loads(data)
params = urllib.urlencode({
'access_token':'[YOUR_ACCESS_TOKEN_HERE]'
})
for media in json['data']:
media_url = " https://api.instagram.com/v1/media/"+media['id']+"/likes"
post = urllib.urlopen(media_url,params).read()
print media['user']['username']+" has like photos"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment