Skip to content

Instantly share code, notes, and snippets.

@prakhar1989
Last active December 30, 2015 05:29
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 prakhar1989/7782929 to your computer and use it in GitHub Desktop.
Save prakhar1989/7782929 to your computer and use it in GitHub Desktop.
Python code for letsrevolutionizetesting challenge.
import requests
def check(r):
base_url = "http://www.letsrevolutionizetesting.com/challenge.json?id="
print "Hitting: %s" % r.url
if 'follow' in r.json():
url_to_follow = r.json().get('follow')
new_url = base_url + url_to_follow.split("=")[-1]
check(requests.get(new_url))
else:
print r.text
if __name__ == "__main__":
url = "http://www.letsrevolutionizetesting.com/challenge.json"
check(requests.get(url))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment