in reply to Re^15: Need help with WWW::Mechanize and Chrome cookies
in thread Need help with WWW::Mechanize and Chrome cookies
If a file does not download, have you tried inspecting the HTTP::Response object you receive from the ->get() call?
my $response = $mech->get($url); open my $output, '>:raw', '/tmp/output.jpg'; print { $output } $response->decoded_content;
Edit: You might need to touch the ->content of the browser first so everything has time to initialize first:
my $response = $mech->get($url); my $c = $mech->content; # Dummy request to initialize everything open my $output, '>:raw', '/tmp/output.jpg'; print { $output } $response->decoded_content;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^17: Need help with WWW::Mechanize and Chrome cookies
by bakiperl (Beadle) on Jul 18, 2021 at 16:31 UTC | |
by Corion (Patriarch) on Jul 19, 2021 at 07:44 UTC | |
by bakiperl (Beadle) on Jul 19, 2021 at 14:09 UTC | |
by Corion (Patriarch) on Jul 27, 2021 at 19:20 UTC | |
by bakiperl (Beadle) on Jul 28, 2021 at 15:24 UTC | |
|