in reply to WWW:Mechanize click_button stream to file?

Afaik, WWW::Mechanize is in fact an LWP::UserAgent object (i.e., inheritance). So your get should work pretty much just like you typed it.

Update: On further consideration, I see that I misunderstood the question. Sorry about that. I think the answer is actually: no.

You'd have to locate the content by hand using the find URL functions and do your the way you want... I have a semi-mech solution in the readmore below. Hopefully there's a better way.

I've included the code from click(), which is similar to click_button(). It seems pretty straight forward and it looks like you could do the $obj->{form}->click() by hand, but that interface wouldn't be supported very well... You could at least direct the request to a file that way until there's a better solution.

sub click { my ($self, $button, $x, $y) = @_; for ($x, $y) { $_ = 1 unless defined; } my $request = $self->{form}->click($button, $x, $y); return $self->request( $request ); }

-Paul

Replies are listed 'Best First'.
Re^2: WWW:Mechanize click_button stream to file?
by cormanaz (Deacon) on Feb 12, 2007 at 14:50 UTC
    But the problem is that the download is initaited by a button click, not a get. Steve