gator has asked for the wisdom of the Perl Monks concerning the following question:
The output that I am getting is,use WWW::Mechanize; use Log::Log4perl qw(:easy); Log::Log4perl->easy_init($ERROR); # The starting point URL my $start_url = "http://***.**.**.*:****"; my $ret_val; my $redir_pattern = 'HTTP-EQUIV="Refresh"\s*CONTENT="0;URL='; my @temp_array; my $redir_url; # Create a new instance of WWW::Mechanize my $agent = WWW::Mechanize->new(); # Retrieve the page $agent->get($start_url); my $content = $agent->content(); print $content; my @links = $agent->find_all_links(); print $#links;
Please note that the HTML contains <META HTTP-EQUIV="Refresh" which find_all_links is not recognizing, as print $#links; is returning -1. Am I doing anything wrong there? Please help... regards Gator<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Inventum - Service Selection Gateway</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1 +"> <META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE"/> <META HTTP-EQUIV="EXPIRES" CONTENT="-1"/> <META HTTP-EQUIV="Refresh" CONTENT="0;URL=http://***.**.**.*:****/ssgu +sercgi/login.ssg?ip=***.**.**.*:****&mac=**:**:**:**:**:**&requestip= +***.**.**.*&requesturi=http%**%**%*****.**.**.*%******%**"> </head> <body> <p align="center">Please wait...<p> </body> </html> -1
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Mechanize not recognizing link in <META HTTP-EQUIV="Refresh"
by Corion (Patriarch) on Nov 01, 2007 at 08:59 UTC | |
|
Re: Mechanize not recognizing link in <META HTTP-EQUIV="Refresh"
by ForgotPasswordAgain (Vicar) on Nov 01, 2007 at 09:02 UTC | |
by Anonymous Monk on Nov 02, 2007 at 03:27 UTC |