Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Screen scraper

by shonorio (Hermit)
on Jan 10, 2007 at 10:11 UTC ( #593869=note: print w/replies, xml ) Need Help??


in reply to Screen scraper

MKevin,

You can use a HTTP::Record to help you to create a Mechanize script, as a like Web Testing with HTTP::Recorder article.

The code bellow do what you want, and don't forget to print to a file, that I didn't.

use WWW::Mechanize; my $agent = WWW::Mechanize->new(); $agent->get('http://vortex.plymouth.edu/uacalplt-u.html'); $agent->form_number(1); $agent->field('pt', 'parcel'); $agent->field('mm', '08'); $agent->field('dd', '24'); $agent->field('pl', 'none'); $agent->field('size', '640x480'); $agent->field('yy', '05'); $agent->field('id', 'KMIA'); $agent->field('hh', '00'); $agent->click(); print $agent->{content};

Solli Moreira Honorio
Sao Paulo - Brazil

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (5)
As of 2020-11-27 11:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?