use WWW::Mechanize;
my $mech = WWW::Mechanize->new;
$mech->get( $url );
say $mech->text;
How could I get the same result with Mojo::UserAgent
?
I tried this, but it doesn't return the same:
use Mojo::UserAgent;
my $ua = Mojo::UserAgent->new;
say $ua->get( $url )->res->dom->all_text;
Simply repeat what method
text
does: seeas_text
in HTML::Element.