in reply to Module to extract text from HTML
Mojo::DOM (via Mojo::UserAgent):
use strict; use warnings; use feature 'say'; use Mojo::UserAgent; my $ua = Mojo::UserAgent->new; say $ua->get('https://www.perlmonks.org')->res->dom->all_text;
use strict; use warnings; use feature 'say'; use WWW::Mechanize; my $ua = WWW::Mechanize->new; $ua->get('https://perlmonks.org'); say $ua->content(format => 'text');
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Module to extract text from HTML
by Bod (Parson) on Feb 27, 2024 at 19:37 UTC |
In Section
Seekers of Perl Wisdom