Skip to content

Instantly share code, notes, and snippets.

@joahg
Last active December 31, 2015 06:59
Show Gist options
  • Save joahg/7951091 to your computer and use it in GitHub Desktop.
Save joahg/7951091 to your computer and use it in GitHub Desktop.
import json
import requests
d = json.loads(requests.get("https://api.github.com/repos/andrew/24pullrequests/contributors?access_token=REDACTED").text)
with open('output.txt', 'wb') as f:
for i in d:
e = json.loads(requests.get(i["url"]+"?access_token=REDACTED").text)
try:
print e["name"]
f.write('\n '+e["name"]+'\n GitHub: '+e["html_url"]+'\n')
except:
print e["login"]
f.write('\n '+e["login"]+'\n GitHub: '+e["html_url"]+'\n')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment