nbipin78 has asked for the wisdom of the Perl Monks concerning the following question:
Output of script is:-use WWW::Mechanize; my $url='https://www.platts.com/Login.aspx?'; my $mechanize = WWW::Mechanize->new(autocheck => 1); $mechanize->cookie_jar(HTTP::Cookies->new); $mechanize->agent('Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.8.1) G +ecko/20061010 (IKDhPmJcdw) Firefox/2.0'); my $response = $mechanize->get( $url ); my $html = $mechanize->content; print "$html \n";
It should get source page of https://www.platts.com/Login.aspx?, But it is saying error “301 moved permanently”. Can anyone help me please on this regard, I tried a lot but not able to fix this issue? Thanks in advance!<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>301 Moved Permanently</title> </head><body> <h1>Moved Permanently</h1> <p>The document has moved <a href="http://www.platts.com?">here</a>.</ +p> </body></html>
20100128 Janitored by Corion: Added formatting, code tags, as per Writeup Formatting Tips
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to avoid "301 moved parmanently " from HTTPS responce?
by JavaFan (Canon) on Jan 28, 2010 at 11:14 UTC | |
|
Re: How to avoid "301 moved parmanently " from HTTPS responce?
by WizardOfUz (Friar) on Jan 28, 2010 at 12:37 UTC | |
|
Re: How to avoid "301 moved parmanently " from HTTPS responce?
by gmargo (Hermit) on Jan 28, 2010 at 18:02 UTC |