As you can see, I'm not doing anything ninja-like. Pretty standard. Using HttpFox and with Curl in debug mode, I saw that calling get( $page_url ) would send a couple of cookies, and authenticate my session. The essence of the script is to login. However (I assume due to the Javascript parsing) the performance is quite bad. Having to not go through the 2-page login process for each instance would help. Unfortunately I can't see if it's sending the cookie or not. I've got the following set, as per WWW::Mechanize's FAQmy $cookie_jar = HTTP::Cookies->new( file => 'cookie_jar.dat', autosa +ve => 1 ); my $w = new WWW::Scripter( agent => 'Mozilla/5.0 (X11; Li +nux x86_64; rv:2.0) Gecko/20110411 Firefox/4.0', cookie_jar => $cookie_jar ) ; $w->add_header( 'Accept' => 'text/html,application/xhtml+xml,applicati +on/xml;q=0.9,*/*;q=0.8' ); $w->add_header( 'Accept-Language' => 'en-us,en;q=0.5' ); $w->add_header( 'Accept-Encoding' => 'gzip, deflate' ); $w->add_header( 'Encoding' => 'euc-jp' ); $w->add_header( 'Keep-Alive' => '115' ); $w->add_header( 'Connection' => 'keep-alive' ); $w->add_header( 'Cache-Control' => 'max-age=0' ); $w->add_header( 'Referer' => undef ); $w->use_plugin( 'JavaScript' ); $w->get( $page_url );
...but I'm not seeing any extra output. Am I missing something about setting the cookie jar? Am I missing something about LWP::Debug?use LWP::Debug qw(+);
In reply to WWW::Mechanize Cookie debugging by GaijinPunch
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |