Deprecated: Function set_magic_quotes_runtime() is deprecated in /home/dfmoore/notes.binarytree.org/textpattern/lib/txplib_db.php on line 14
Notes: Scraping for mohawk weather

Notes

 
 

Scraping for mohawk weather

Jul 27, 11:37 AM

curl -s --user-agent "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_6; en-us) AppleWebKit/533.20.25 (KHTML, like Gecko) Version/5.0.4 Safari/533.20.27" http://www.weather.com/weather/hourbyhour/CAXX0518 | egrep '(hbhDateHeader)|(hbhTDCondition")|(hbhTDTime)|(hbhTDHumidity)|(hbhTDWind)' | sed 's/<[^>]*>//g'

This will return the day, hour, temperature, and humidity—The things you need to know if you want to rock a 11” hawk out and about. Currently hardcoded for Vancouver, for when I hit up SIGGRAPH and won’t have a lot of international bandwidth to check these things.

Comments