At 16:24 2005-03-28, Jerry Kassebaum wrote:
use LWP;
$browser=LWP::UserAgent->new;
$url="http://tvguide.com/";;
$response=$browser->post($url, ['name'=>'email', 'id'=>'email', 'value'=>'[EMAIL PROTECTED]',]);
print"$response";

What you get back is a HTTP::Response object. Reading the docs for that class (perldoc HTTP::Response) says the HTML you want to scrape is in $response->content.


Read lwpcook (perldoc lwpcook) to understand the issues at hand, then install WWW::Mechanize and read the docs for that module. It's even more adapted to being a web browser than LWP::UserAgent and will make your life a lot easier.

This is a good (but old) introduction to Mechanize:
http://www.perladvent.org/2002/16th/


/J

-------- ------ ---- --- -- --  --  -     -     -        -          -
Johan Lindström    Sourcerer @ Boss Casinos   johanl AT DarSerMan.com

Latest bookmark: "TCP Connection Passing"
http://tcpcp.sourceforge.net/
dmoz: /Computers/Programming/Languages/JavaScript/ 12

_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to