Skip to content

Instantly share code, notes, and snippets.

@ClaireNeveu
Created August 21, 2014 17:47
Show Gist options
  • Save ClaireNeveu/88f14c3aa4ad4f6d70f6 to your computer and use it in GitHub Desktop.
Save ClaireNeveu/88f14c3aa4ad4f6d70f6 to your computer and use it in GitHub Desktop.
get Blog follows
#!/usr/bin/python
from sys import argv
import urllib2
import json
from time import sleep
blogHost = argv[1]
def run(host):
blogInfo = json.load(urllib2.urlopen("http://api.kinja.com/api/blog/byhost/" + host))
blogId = blogInfo['data']['id']
blogFollows = json.load(urllib2.urlopen("http://api.kinja.com/api/followservice/followedby/blog/" + str(blogId)))
for followId in blogFollows['data']:
followInfo = json.load(urllib2.urlopen("http://api.kinja.com/api/blog/" + str(followId)))
print(followInfo['data']['name'])
run(blogHost)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment