Here is a little php class (not mine) that has come in very handy for me:
jonasjohn.de: htmlSQL - a PHP class to query the web by an SQL like language
Basically it has a simple SQL syntax for scraping.
It hasn't been updated in a year and a half but it works pretty good. I was thinking about...