Hello list!

I wish I could buy everyone on here a beer.

Has anyone used HTTP::Request::Form to hit radio buttons on a web page
before?

It works great for me when I try it on a simple HTML page but I am trying to
fetch a bunch of complex HTML from the error web page on our mail server.  

This is so I can hit the "delete" radio buttons on the web page instead of
manually droning through them all.

When I attempt it on this particular URL, I see the lights on my DSL router
going nuts (so it is definitely bringing the page down), perl.exe inside of
task manager is pegged at like 98% and then after about 5 minutes or so of
perl trying to parse it I guess I get this weird error message:

D:\BotArchive\Deferred>justerror.pl
Can't call method "as_HTML" without a package or object reference at
D:/Perl/site/lib/HTTP/Request/Form.pm line 94.

I get the same thing whether it is on my NT 2000 box running Perl 5.6 or my
Linux system running 5.6

Has anyone seen this error before or might know what it means?  Again, if it
is joe simple page it works fine but when it is this complex page it bombs.

Here is a small code snippet I rewrote from the perldoc.com homepage.  I am
just telling it to give me all the fields and all the buttons.  Works fine
for altavista but chokes on the mail server:

Thanks!

#! perl.exe

  use HTML::TreeBuilder;
  use URI::URL;
  use LWP::UserAgent;
  use HTTP::Request;
  use HTTP::Request::Common;
  use HTTP::Request::Form;
  my $ua = LWP::UserAgent->new;
  my $url = url 'http://www.altavista.com';
  my $res = $ua->request(GET $url);
  my $tb = HTML::TreeBuilder->new;
  $tb->parse($res->content);
  my @forms = @{$tb->extract_links(qw(FORM))};
  my $f = HTTP::Request::Form->new($forms[0][1], $url);
  @buttons = $f->buttons();
  print "Here are the buttons: @buttons\n\n";
  #Get list of all fields in $f
  @allfields = $f->allfields();
  print "Here are all the fields: @allfields\n\n";

_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users

Reply via email to