I've been tackling this little problem for a while now, and I even tried using WWW::Mechanize::Shell but it produces the same 'session expired' error
Basically, everyhing goes well until the last 'click_button', whereupon the result I get is a 'you need to start a new session' page. The session id is kept constant in a hidden field in the form, and I've even tried 'forcing' this as you can see within a scope with warnings turned off#!/usr/bin/perl -w require strict; use lib '/home/visitors/seaver/modules/lib/perl5/site_perl/5.6.1'; use WWW::Mechanize; my $mech = WWW::Mechanize->new(); $mech->get("http://isiknowledge.com/?DestApp=WOS&Func=Frame"); $mech->follow_link(tag => 'frame', n => 2); $mech->click('General Search', [2,2]); $mech->field("topic","emergence AND complexity"); $mech->click(); $sid = $mech->value('SID'); { local $^W = 0; $mech->field('SID',$sid); } $mech->click_button(name=>'Submit'); print $mech->content;
Does anyone have any suggestions as to what I may be doing wrong?
Thanks
Sam
In reply to WWW Mechanize not keeping session? by seaver
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |