Use Perl Mechanize and LWP to Scrape Site Data

LWP is a great module for scraping data. This script example was created for a customer that wanted to profile various cities for marketing purposes.

It should be said that complex regex is not generally the best way to parse pages. If the page changes, the regex will no longer parse like expected. A better tool might be anything else besides regex!

With that said, this is also a good demo of how to use LWP.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.