[Chicago-talk] Downloading a file via WWW::Mechanize
Alex
axs at m-net.arbornet.org
Sun Oct 3 22:57:53 CDT 2004
add another $mech->submit_form() after the first one
----- Original Message -----
From: "Jay Strauss" <me at heyjay.com>
To: "Chicago.pm chatter" <chicago-talk at mail.pm.org>
Sent: Saturday, October 02, 2004 12:16 PM
Subject: Re: [Chicago-talk] Downloading a file via WWW::Mechanize
> Andy Lester wrote:
>
> >>
> >> I know your trying to help. But all the examples, the cookbook, the
> >> docs talk about having a url to get. I'm not doing a "get", I'm
> >> doing a "post". I can't supply |:content_file option.|
> >
> >
> > And once you post, and it sends you a file back, it's in your
> > $agent->content. Write that out to a file.
> >
> > xoa
> >
> Isn't that what I'm doing with my original posting of my code??
>
> #!/usr/bin/perl
>
> use WWW::Mechanize;
> my $url = "http://www.cboe.com/DelayedQuote/QuoteTableDownload.aspx";
>
> my $mech = WWW::Mechanize->new();
> $mech->get( $url );
>
> my $res = $mech->submit_form(
> form_number => 1,
> fields => {ticker => 'QQQ'},
> );
>
> print $mech->content;
> _______________________________________________
> Chicago-talk mailing list
> Chicago-talk at mail.pm.org
> http://mail.pm.org/mailman/listinfo/chicago-talk
>
More information about the Chicago-talk
mailing list