Hi All,
I am a beginner with PERL and I have a small query here.Please look thro' these lines 
of code below where I am trying just to extract the HTML source by supplying the link 
as in the code.But I end up getting the message

Your browser is not accepting our cookies. To view this page,please set your browser 
preferences to accept cookies (code 0).

in HTML format !!! :-) in the file.

Here is my code.Please suggest ways to make it work.

my $ua = new LWP::UserAgent;
my $cookie_jar = HTTP::Cookies->new;
my $url = 'http://groups.yahoo.com/group/dini/message/1452?threaded=1';
my $file = 'tryfile';
my $request = new HTTP::Request ('GET' => $url);

$cookie_jar->add_cookie_header($request);

$request->header('Accept' => 'text/html');
$request->header('Accept' => 'text/plain');

my $response;
my $response = $ua->request($request,$file);

$cookie_jar->extract_cookies($response);

Thanks in advance,
Deepak. 

Reply via email to