in reply to Perl mechanize get Error!
What is your goal with this script? I have written a brief tutorial on using mechanize that can be found here: WWW::Mechanize Basics
If you need to do a lot of navigating on the site, I would recommend WWW::Mechanize::Firefox since it uses a lot of javascript. WWW::Mechanize and javascript don't get along too well. Also, try
So to go there, just do
If you need to do a lot of navigating on the site, I would recommend WWW::Mechanize::Firefox since it uses a lot of javascript. WWW::Mechanize and javascript don't get along too well. Also, try
I also recommend getting the firebug firefox extension and manually inspecting the page for each thing you want to access. For example, the url for 'Latest News' is http://www.truro-penwith.ac.uk/category/news/ which I determined by using the firebug extension..$mech->dump_text;
So to go there, just do
UPDATE: Also, simply:$mech->get('http://www.truro-penwith.ac.uk/category/news/');
worked for me.. you don't need to do anything with headers..my $mech = WWW::Mechanize->new(); $mech->get('http://www.truro-penwith.ac.uk/'); $mech->dump_text;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Perl mechanize get Error!
by Anonymous Monk on Jan 04, 2014 at 08:26 UTC | |
by PerlSufi (Friar) on Jan 06, 2014 at 15:04 UTC |
In Section
Seekers of Perl Wisdom