in reply to Re^6: Need help with WWW::Mechanize and Chrome cookies
in thread Need help with WWW::Mechanize and Chrome cookies
The links for these files
can be obtained using the WMC instance by doing something like this<a class="txt" href="file.txt"> Text File </a>
In the case of WWW::Mechanize (WM) you can simply download the files using this codemy @links = $mech->find_all_links( text_contains => 'some description +etc... ' ); my @urls = map { $_->[0] } @links;
Unfortunately, this function does not work with WWW::Mechanize::Chrome (WMC). I hope the Author of WMC can shed some light on this or provide a patch. Thank you.for my $foo (@urls) { my $filename = '/path/'.$foo; $mech->get($foo, ':content_file'=>$filename); }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^8: Need help with WWW::Mechanize and Chrome cookies
by Corion (Patriarch) on Jul 09, 2021 at 22:17 UTC | |
by bakiperl (Beadle) on Jul 11, 2021 at 12:20 UTC | |
by Corion (Patriarch) on Jul 11, 2021 at 15:20 UTC | |
by Corion (Patriarch) on Jul 11, 2021 at 14:09 UTC | |
by bakiperl (Beadle) on Jul 11, 2021 at 14:42 UTC | |
by Corion (Patriarch) on Jul 11, 2021 at 15:10 UTC | |
| |
by bakiperl (Beadle) on Jul 09, 2021 at 22:24 UTC |
In Section
Seekers of Perl Wisdom