use strict; use Mojo::UserAgent; my $ua = Mojo::UserAgent->new; my $tx = $ua->get("www.amazon.com"); $ua->max_redirects(5); $tx->res->dom('li.navSaChildItem')->each(sub { my $item = $_; print "[CSS3 Selector] Departments: ".$item->a->text."\n"; }); print "Title: ".$tx->res->dom->html->head->title->text."\n";
In reply to Re: Mechanize to TreeBuilder-XPath
by kelchris
in thread Mechanize to TreeBuilder-XPath
by Ricalsin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |