Intaglio has asked for the wisdom of the Perl Monks concerning the following question:
I'm writing a program for my own personal use that will grab stuff from various webpages and display just what I want so I can set it as my homepage and get my stock information, latest sports news, headlines, etc. all in one place everytime I startup IE. For this reason I'm trying to get this program to login to my excite.com page and grab that info from it. This is what I have so far:
#!/usr/local/bin/perl -w use HTTP::Request::Common qw( POST ); use LWP::UserAgent; print "Content-type:text/html\n\n"; my $ua = new LWP::UserAgent; my $req = POST 'http://reg.excite.com/mps/login?a=a&pname=pfp&brand=excite&targeturl= +http://www.excite.com/&ml_id=link:xcit:1008:i:', [ acctname => 'Intaglio', passwd => '******' ]; my $res = $ua->request($req)->content; if ($res->is_success) { print $res->content; } else { print $res->error_as_HTML; }
The only problem is that it displays just a blank white page. Can anyone send a few helpful hints my way? Is it a problem that the page I'm sending the post information to is http://reg.excite.com/mps/login?a=a&pname=pfp&brand=excite&targeturl=http://www.excite.com/&ml_id=link:xcit:1008:i: or would that make a difference so long as its the correct page you can login to? There's also quite a bit of javascript password encryption on the login page, could this be a hindrance of my script?
Is what I want to do even possible?
Any help would be appreciated,
-- Intaglio
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: LWP/login question
by chromatic (Archbishop) on Jan 11, 2001 at 10:04 UTC | |
|
Re: LWP/login question
by zzspectrez (Hermit) on Jan 11, 2001 at 11:32 UTC | |
by repson (Chaplain) on Jan 11, 2001 at 11:54 UTC |