Skip to content

Instantly share code, notes, and snippets.

@hoosteeno
Last active December 23, 2015 09:09
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save hoosteeno/6612916 to your computer and use it in GitHub Desktop.
Save hoosteeno/6612916 to your computer and use it in GitHub Desktop.
Get vouched mozillians names. Print to STDOUT.
import requests
app_name = 'get_your_own'
app_key = 'get_your_own'
next_set = '/api/v1/users/?app_name=' +\
app_name +\
'&format=json&app_key=' +\
app_key +\
'&limit=500&offset=0&is_vouched=true'
while next_set is not None:
r = requests.get('https://mozillians.org' + next_set)
next_set = r.json()['meta'].get('next', None)
for o in r.json()['objects']:
name = o.get('full_name', '')
if name is not '':
print(name)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment