How can I screen scrape with Perl?
问题 I need to display some values that are stored in a website, for that I need to scrape the website and fetch the content from the table. Any ideas? 回答1: If you are familiar with jQuery you might want to check out pQuery, which makes this very easy: ## print every <h2> tag in page use pQuery; pQuery("http://google.com/search?q=pquery") ->find("h2") ->each(sub { my $i = shift; print $i + 1, ") ", pQuery($_)->text, "\n"; }); There's also HTML::DOM. Whatever you do, though, don't use regular