Archive for August, 2008

Python Web Search Agent

August 15th, 2008

So there was this web page, nothing more than a text file in fact, which I was compelled to check regularly. I had ordered something online from a company whose web-store design was still in the dark ages, and their “method” of letting customers know whether or not their products had shipped was to periodically update a web-viewable text file with a public list of all the order numbers that had recently shipped. Very private and secure, I know.

No, no, they couldn’t possibly email this information to you — you had to check the page manually. And if your products were backordered, as mine were, you’d be checking often.

Well, that’s just stupid, I thought, and since I had a computer sitting right in front of me, I thought it might be a good idea to automate the process.

So I cobbled together a little Python script on my Ubuntu box, which uses the pycURL interface to grab the URL in question, parse it, search it for my order number, and then fire me off an email (using sendmail) if and when it finds anything.

I automated the script to run hourly using cron, like so:

crontab -e

and then included the following line in my crontab file:

# m h  dom mon dow   command
7 * * * * /path/to/searchagent.py

Seven minutes after the hour (for luck), every hour, every day.

On the hunch that this script might be useful to somebody else, I decided to post it here. Fair warning to all: this is a huge hack, and I’m sure it needs work. Also, there’s probably a better method that I’ve completely overlooked. Comments, corrections, and suggestions are welcome, as always.

Here’s the script:

Read more »

Oshkosh: The Spirit of Aviation

August 10th, 2008

RV-8 VFR Arrival at Oshkosh

August 9th, 2008

Check out this outstanding tail-cam video of Larry Bowen’s RV-8 kitplane “Nifty” arriving at EAA AirVenture 2007 in Oshkosh, Wisconsin. It’s a great example of how the situation in aviation can quickly progress from “uneventful” to “exciting” in seconds.

During the week of the Experimental Aircraft Association’s AirVenture airshow each July, the Oshkosh Wittman Regional Airport (OSH) becomes the busiest airport in the world.

Read more »