in reply to Re^2: problem login using WWW::Mechanize
in thread problem login using WWW::Mechanize
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: problem login using WWW::Mechanize
by shekarkcb (Beadle) on Jun 10, 2008 at 12:25 UTC | |
So you mean to say that the below code examples the same right?
use HTTP::Cookies;
use WWW::Mechanize;
my $cookiefile = 'cookies.txt';
my $cookie_jar = HTTP::Cookies->new(File => $cookiefile, autosave =>1);
my $m = WWW::Mechanize->new( autocheck => 1 );
$m->cookie_jar($cookie_jar);
my $url="https://www.bittorrent.com/account/signin";
$m->get($url);
$m->submit_form(
form_number => 2,
fields => {
username => 'abcd',
password => 'abcd',
}
);
my $content= $m->content;
and from now you can use $m to do any thing i mean to say can i use $m to get content of any linked page inside the login page ??? something like this??
So If any thing requires in $content_3 page requires a authentication then will my code 2ndpartremembers the earlier cookies as i have coded above see Ist part Please suggest me .... Thanx, Shekar | [reply] [d/l] |
|
Re^4: problem login using WWW::Mechanize
by Anonymous Monk on Jun 10, 2008 at 16:26 UTC | |
So you mean to say that the below code examples the same right?
use HTTP::Cookies;
use WWW::Mechanize;
my $cookiefile = 'cookies.txt';
my $cookie_jar = HTTP::Cookies->new(File => $cookiefile, autosave =>1);
my $m = WWW::Mechanize->new( autocheck => 1 );
$m->cookie_jar($cookie_jar);
my $url="https://www.bittorrent.com/account/signin";
$m->get($url);
$m->submit_form(
form_number => 2,
fields => {
username => 'abcd',
password => 'abcd',
}
);
my $content= $m->content;
and from now you can use $m to do any thing i mean to say can i use $m to get content of any linked page inside the login page ??? something like this??
So If any thing requires in $content_3 page requires a authentication then will my code 2ndpartremembers the earlier cookies as i have coded above see Ist part Please suggest me .... Thanx, Shekar | [reply] [d/l] |