I would recommend starting with WWW::Mechanize. It's an easier-to-use layer
on top of LWP with many conveniences for following links, filling out forms,
etc.

Sample code:

    use WWW::Mechanize;
    my $mech = WWW::Mechanize->new();

    $mech->get( $url_to_login_page );

    $mech->submit_form(
        form_name => 'frmLogin',
        fields    => { email  => '[EMAIL PROTECTED]', },
    );

    # Do more stuff, follow links, etc.

    # Print the results
    print $mech->content;


Hope this helps.
-- Mark.

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of Jerry Kassebaum
> Sent: Monday, March 28, 2005 9:24 AM
> To: perl-win32-users@listserv.ActiveState.com
> Subject: TVGuide
> 
> 
> I would like to automate tvguide.com.
> 
> I have read Spidering Hacks, but I'm stuck.
> 
> Here is the form portion of their code that takes my e-mail 
> address for the 
> log-in:
> 
> 
> 
> *************
> 
> <form action="login.asp" method="post" id="frmLogin" name="frmLogin">
>       <tr>
>               <td     bgcolor="#EEEEEE"
>                       valign="top"
>                       align="left"
>                       style="padding-left:10px; 
> padding-right:5px; padding-top:15px; 
> padding-bottom:8px;">
>                       <input id="guid" name="returnurl" 
> type="hidden" value="">
>                       <input id="guid" name="referrer" 
> type="hidden" value="">
>                       <input id="guid" name="regMode" 
> type="hidden" value="0">
> 
> 
> 
>                       <b>Please enter your email address:</b><br>
>                       <img src="/images/space.gif" width="14" 
> height="14"><br>
>                       <INPUT type="text" name="email" 
> id="email" value="" size="20" 
> style="width:150px">
>                       <input  type="image"
>                               name="go"
>                               id="go"
>                               src="/myprofile/images/login.gif"
>                               align="absmiddle"
>                               border="0"
>                               hspace="5">
> 
>               </td>
>       </tr>
> </form>
> 
> *******************
> 
> 
> 
> 
> 
> 
> Here's what I have so far:
> 
> ************
> 
> use LWP;
> $browser=LWP::UserAgent->new;
> $url="http://tvguide.com/";;
> $response=$browser->post($url, ['name'=>'email', 'id'=>'email', 
> 'value'=>'[EMAIL PROTECTED]',]);
> print"$response";
> 
> *****************
> 
> 
> 
> I get: HTTP::Response=HASH(0x2883cb4)
> 
> 
> Now what?
> 
> 
> _______________________________________________
> Perl-Win32-Users mailing list 
> Perl-Win32-Users@listserv.ActiveState.com
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
> 

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

Reply via email to