Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^8: fetching and storing data from web.

by choroba (Chancellor)
on Jan 27, 2012 at 14:05 UTC ( #950373=note: print w/replies, xml ) Need Help??


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

It uses the same API as WWW::Mechanize, so just see WWW::Mechanize::Examples.
  • Comment on Re^8: fetching and storing data from web.

Replies are listed 'Best First'.
Re^9: fetching and storing data from web.
by chessgui (Scribe) on Jan 27, 2012 at 14:39 UTC
    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("http://search.cpan.org/"); # submit the query form $browser->submit_form(with_fields=>{query=>$module_name});

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://950373]
help
Chatterbox?
[Tanktalus]: Wow, given the time separation of marioroy's oatmeal cookies and Disciplulus' response, I'm amazed that marioroy responded :)
[Discipulus]: no no seriously, redss posed a good question in the right moment, and you gave as always wonderful answers
[Discipulus]: Tanktalus my comment was about how to fork & join in tk?
[marioroy]: Oh, I've might of missed Discipulus's earlier response. I had gone to bed.
[Tanktalus]: ah, I don't even have the perlmonks site open in my browser :)
Tanktalus is chatting through his cbstats application :)
[marioroy]: Perl is so much fun.
[Discipulus]: Tanktalus i recently started a Meditation about marioroy's MCE suit of modules, but is even better to see a practical question answered than responses to my meditation
[Discipulus]: good night mario!

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2017-04-23 19:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (432 votes). Check out past polls.