Created
January 16, 2015 14:01
-
-
Save danielmiessler/cd4043386e2d73847194 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 'rubygems' | |
require 'nokogiri' | |
require 'open-uri' | |
# Change for your ZIP | |
page = Nokogiri::HTML(open("http://www.airnow.gov/?action=airnow.local_city&zipcode=94102&submit=Go")) | |
# Get the current air quality | |
puts page.css('table.AQData td.AQDataLg').text |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment