in reply to Re: Module to extract text from HTML
in thread Module to extract text from HTML
What? No WWW::Mechanize::Chrome?
use Log::Log4perl qw(:easy); use WWW::Mechanize::Chrome; my %default_mech_params = ( headless => 1, launch_arg => [ '--window-size=600x800', '--password-store=basic', # do not ask me for stupid chrome ac +count password '--disable-gpu', '--ignore-certificate-errors', '--disable-background-networking', '--disable-client-side-phishing-detection', '--disable-component-update', '--disable-hang-monitor', '--disable-save-password-bubble', '--disable-default-apps', '--disable-infobars', '--disable-popup-blocking', ], ); my $mech = WWW::Mechanize::Chrome->new(%default_mech_params); $mech->get('https://perlmonks.org/?node_id=11157915'); $mech->sleep(5); my $text_string = $mech->content( format => 'text' ); print $text_string;
bw, bliako
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Module to extract text from HTML
by parv (Parson) on Feb 27, 2024 at 21:22 UTC | |
by bliako (Abbot) on Feb 27, 2024 at 22:04 UTC |