Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

Re^9: fetching and storing data from web.

by chessgui (Scribe)
on Jan 27, 2012 at 14:39 UTC ( #950379=note: print w/ replies, xml ) Need Help??

in reply to Re^8: fetching and storing data from web.
in thread fetching and storing data from web.

Thanks. By reworking one of the examples I was able to put together a code which opens the Firefox browser, loads the CPAN search page, fills in the query field with 'WWW::Mechanize' and then submits the form:

#!/usr/bin/perl use strict; use warnings; # the module we're looking for my $module_name = 'WWW::Mechanize'; # create a new browser use WWW::Mechanize::Firefox; my $browser = WWW::Mechanize::Firefox->new( launch => 'C:/Program Files/Mozilla Firefox/firefox.exe',tab=>'cur +rent' ); # tell it to get the main page $browser->get(""); # submit the query form $browser->submit_form(with_fields=>{query=>$module_name});

Comment on Re^9: fetching and storing data from web.
Download Code

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://950379]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (8)
As of 2015-11-30 01:08 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (755 votes), past polls