in reply to Using LWP to automate a login

What you're missing is the bit of JavaScript which puts a value into that "data" field. In the HTML, it's empty, so if the login script expects a value there's got to be a script which sets document.postform.data.value = 'something'. You'll need to find that and manually add it somehow.

WWW::Mechanize will help you do that via the update_html method.



Nobody says perl looks like line-noise any more
kids today don't know what line-noise IS ...

Replies are listed 'Best First'.
Re^2: Using LWP to automate a login
by gw1500se (Beadle) on Jul 30, 2007 at 02:08 UTC
    Thanks for the replies. You did move me forward a little. There is a javascript that does what you suggest. Apparently when it is downloaded, it contains nothing more then data="some hash string". It is not a funciton so it must be executed when the page loads and thus the value of 'data' is established. So the question becomes, how do I "GET" that value?

    I don't seem to see it in the data returned by "GET". All that shows up is the javascript tag. Does "GET" not include the source for downloaded javascripts (as opposed to imbedded scripts which do show up)?

    As an aside, the reason I didn't include any perl code is because there isn't any yet beyond a "GET" and a "PRINT" of the page. I won't write any real code until I understand what I need to do.

    Thanks again.