Here's a HUGE tip for those of you who are about to build a screen scraper with WWW::Mechanize and Hpricot. If you have any intention of parsing hundreds or thousands of pages (you probably do, right, otherwise you wouldn't be screen scraping), you better set max_history to a very low number (say, 1 for example).
If you don't, Mechanize will remember every page you visit... and that can add up quickly to megabytes of memory if you're scanning multiple pages.

tagged with: 