Scraping information off web sites.. books have been written on the topic. Other authors have mentioned specifics. You can Google screen scraping for more information, and this O' Reilly book I've found helpful in many ways. Most of the book's examples are Perl code.
Spidering Hacks