Created
November 13, 2012 19:32
-
-
Save mchail/4067850 to your computer and use it in GitHub Desktop.
Check google's nexus page until I can buy one
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
#!/usr/bin/ruby | |
require 'rest-client' | |
counter = 0 | |
can_has_phone = false | |
while !can_has_phone | |
puts "checking... (#{counter})" | |
src = RestClient.get("https://play.google.com/store/devices/details?id=nexus_4_16gb") | |
can_has_phone = !((src =~ /coming\ soon/i) || (src =~ /sold out/i)) | |
counter += 1 | |
sleep 5 | |
end | |
puts "YOU CAN HAZ PHONE NAO! QUICK!" | |
`open https://play.google.com/store/devices/details?id=nexus_4_16gb` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment