Created
November 15, 2014 19:52
-
-
Save git-toni/705b2e550c782a0b4a62 to your computer and use it in GitHub Desktop.
Rainforest challenge
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
#!/bin/env | |
require 'httparty' | |
require 'cgi' | |
require 'pry' | |
myid=995287801 | |
200.times do |i| | |
begin | |
response=HTTParty.get("http://letsrevolutionizetesting.com/challenge.json?id=#{myid}") | |
json=JSON.parse(response.body) | |
query=URI.parse(json['follow']).query | |
cgi=CGI.parse(query) | |
myid=cgi['id'][0] | |
p "THE ID IS #{myid}" | |
p "COUNTER #{i}" | |
p response.body | |
p '----------' | |
rescue | |
binding.pry | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment