Last active
December 25, 2015 03:28
-
-
Save gabceb/6909505 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## This piece of code is not optimized for beauty or # of lines so don't judge :p | |
require 'open-uri' | |
require 'JSON' | |
url = "http://www.letsrevolutionizetesting.com/challenge" | |
while true do | |
url = url.gsub("challenge", "challenge.json") | |
json = JSON.parse(open(url).read) | |
puts "RESPONSE: #{json}" | |
# Grab the follow key from the json | |
url = json["follow"] | |
puts "Got it! Trying #{url}" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
kinda defeats the purpose if you give it away...