http://qs1969.pair.com?node_id=554930

myuserid7 has asked for the wisdom of the Perl Monks concerning the following question:

Hello everyone,

I'm using Mechanize to download some files within multiple spidered pages. Unfortunately Javascript is used to write out the links to the files on each page, so I've been injecting the links manually and then following them:

my $html =~ s#</body#<a href="..">MY LINK</a></body#; $m->update_html($html); $m->follow_link(text=>"MY LINK"); $m->save_content(..);

there must be a better way to do this.. any ideas?

thanks.

Edited by planetscape - changed pre to code tags

( keep:1 edit:15 reap:0 )