#!/usr/bin/perl --
use strict;
use warnings;
use WWW::Mechanize;
my @date = ( 18960101, "18960101\n", );
foreach my $date (@date) {
my $mech = WWW::Mechanize->new();
$mech->agent_alias('Windows IE 6');
$mech->get("http://bub2.meteo.psu.edu/wxstn/wxstn.htm");
$mech->form_number(1);
$mech->field( 'dtg', $date );
eval { $mech->click(); 1 }
or print "$@\n", $mech->response->content, "\n";
print "-=> date => [$date] => ", $mech->status, "\n";
# my $file = "c:/perl/scripts/dates/$date.txt";
# $mech->save_content($file);
$mech->back();
}
__END__
-=> date => [18960101] => 200
Error POSTing http://bub2.met.psu.edu/cgi-win/WXDaily.EXE: Internal Er
+ror at 2 line 14
<HTML><HEAD>
<TITLE>Error in /cgi-win/WXDaily.EXE</TITLE>
</HEAD><BODY>
<H1>Error in /cgi-win/WXDaily.EXE</H1>
An internal Visual Basic error has occurred in /cgi-win/WXDaily.EXE.
<PRE>Bad file name or number (error #52)</PRE>
<I>Please</I> note what you were doing when this problem occurred,
so we can identify and correct it. Write down the Web page you were us
+ing,
any data you may have entered into a form or search box, and
anything else that may help us duplicate the problem. Then contact the
administrator of this service:
<A HREF="mailto:wjs1@psu.edu">
<ADDRESS><wjs1@psu.edu></ADDRESS>
</A></BODY></HTML>
-=> date => [18960101
] => 500
|