Don't ask to ask, just ask | |
PerlMonks |
WWW::Mechanize and session idby seaver (Pilgrim) |
on Sep 28, 2004 at 15:46 UTC ( [id://394639]=perlquestion: print w/replies, xml ) | Need Help?? |
seaver has asked for the wisdom of the Perl Monks concerning the following question:
Dear all, Im using WWW::Mechanize to scrape a online library of citations. It seems to be working well, and easily. However, this online library needs a session id, persistent throughout its search, which is present in a hidden input field. Here's my code so far:
Its pretty straight forward, and for the first couple of pages, it goes well, but on the last 'Submit', the response page claims I need to start a new session!! I've encountered this before, and I actually did try extracting the session id from previous pages, and inserting it into the hidden field in the last page, but WWW::Mechanize wont let me, as it says that field is 'read-only' I assume because it is hidden. The funny thing is, I stopped using HTTP::Request::Form, because there was a bug concerning multiple checkboxes of the same name, however doing this same thing with HRF, I could get through to the next page, so WWW::Mechanize seems to be dropping the session id, what's going on? Is it possible that there's a redirect that it's following automatically WITHOUT the session id?
Thanks
Back to
Seekers of Perl Wisdom
|
|