Skip to content

Instantly share code, notes, and snippets.

@glifchits
Created April 11, 2014 22:44
Show Gist options
  • Save glifchits/10507584 to your computer and use it in GitHub Desktop.
Save glifchits/10507584 to your computer and use it in GitHub Desktop.
# -*- coding: utf-8 -*-
# <nbformat>3.0</nbformat>
# <codecell>
import requests
base_url = 'http://letsrevolutionizetesting.com/challenge.json'
r = requests.get(base_url)
print r.json()
# <codecell>
url = r.json()['follow']
url
# <codecell>
import urllib
while u'follow' in r.json():
url = r.json()['follow']
new_id = urllib.splitquery(url)[1]
new_url = base_url + '?' + new_id
r = requests.get(new_url)
print r.text
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment