* Matthew Smith ([EMAIL PROTECTED]) [04 Dec 2002 15:27]:
> Hi

> I've been trying to write a script which can log into Yahoo and
> retrieve information on my current auctions.  Seems simple enough, but
> I keep getting "The browser you're using cannot sign in (refuses
> cookies)" back from Yahoo; I can't see why.  Nothing bad comes out of
> the debug messages.

Perhaps take a look at WWW::Yahoo::Groups and how it logs in.

> Can anyone see anything wrong with this code (below)?

It *appears* ok, but I'd probably construct the POST request differently
(and thus let LWP handle the escaping and such). See the examples in
perldoc HTTP::Request::Common.

[...]
> # Query String - note that login and password have been
> # removed for this posting
> my 
> 
>$content="hasMsgr=0&.chkP=Y&login=*****&passwd=*****&.persistent=y&.save=Sign%20In&.tries=1&.src=auc&.done=$done";

> my $ua=LWP::UserAgent->new;
> my $cookie_jar=HTTP::Cookies->new(file=>"lwpcookies.txt", autosave=>1);

> my $req=HTTP::Request->new(POST=>$target);

my $req = POST $target, [ hasMsgr => 0, .chkP => 'Y' ... ]


But take a look at WWW::Yahoo::Groups. I should probably farm the login
process out since it seems to be generic across most of Yahoo.


cheers,
-- 
Iain.

Reply via email to