in reply to How to get password protected content via LWP - by emulating my own browser (that can view that content)
"Want to make use of already authenticated session that I started on mozilla."
Is there a specific reason for this? If not, try the credentials() method?
use LWP::UserAgent qw(); my $ua = LWP::UserAgent->new; my $netloc = 'http://www.buddhism-dict.net/cgi-bin/xpr-dealt.pl:80'; $ua->credentials( $netloc, 'CJK-E and Buddhist Dictionaries', # basic realm 'guest', # user '', # empty pw ); my $response = $ua->get($netloc);
Example taken from Rosetta Code.
I'm so adjective, I verb nouns!
chomp; # nom nom nom
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to get password protected content via LWP - by emulating my own browser (that can view that content)
by Prat824 (Acolyte) on Sep 03, 2008 at 23:31 UTC | |
by Lawliet (Curate) on Sep 03, 2008 at 23:36 UTC | |
by Anonymous Monk on Sep 04, 2008 at 06:57 UTC |