Skip to content

Instantly share code, notes, and snippets.

@vpontis
Created December 3, 2013 03:16
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 vpontis/7763343 to your computer and use it in GitHub Desktop.
Save vpontis/7763343 to your computer and use it in GitHub Desktop.
Solution code for letsrevolutionizetesting.com
from httplib import HTTPConnection
import json
if __name__ == '__main__':
base_url = '/challenge.json'
url = base_url
count = 0
conn = HTTPConnection('www.letsrevolutionizetesting.com')
while count < 100:
conn.request("GET", url)
r = conn.getresponse()
print r.status, r.reason
data = r.read()
print data
json_dict = json.loads(data)
new_id = json_dict['follow'].split('=')[1]
url = base_url + '?id=' + new_id
print url
count += 1
conn.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment