Created
December 23, 2011 17:49
-
-
Save carylee/1514901 to your computer and use it in GitHub Desktop.
Script to check if Bing API is working or broken
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
require 'rbing' | |
$BINGAPPID = ENV['BINGAPPID'] | |
print "Does bing seem to be working?... " | |
bing = RBing.new($BINGAPPID) | |
rsp = bing.web("site:chicagotribune.com budget", :count=>50) | |
if rsp.web.total == 42 | |
puts "nope." | |
else | |
puts "yes! found #{rsp.web.total.to_s} results!" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment