in reply to Re^5: How do I access a password protected site and access data?
in thread How do I access a password protected site and access data?

Hi,

Yes I ignored it and installed, but a test using the script that you so kindly provided, resulted in a strange error:

"No such field 'username' at /location/of/perl/modules/WWW/Mechanize.pm line 1169"

So, ignoring the 'make run' error was probably not a good idea. Thanks for the link to the turorial. BTW, I got my script working using LWP, so I'm going to postpone investigating Mechanize for later.

I had to specify the content-type as "application/x-www-form-urlencoded" in the header and send the username and password as content to get it to work.
A friend of mine suggested that I do this as he said the server might be ignoring the login info when sent as form data

Thanks for all your help! I have learnt a lot trying to write this script!

  • Comment on Re^6: How do I access a password protected site and access data?

Replies are listed 'Best First'.
Re^7: How do I access a password protected site and access data?
by marto (Cardinal) on Jul 11, 2005 at 22:02 UTC
    Hi,

    Double check the number of forms on the page you are working with.
    If you just change the URL in the example I posted the form number may be wrong.

    Hope this helps

    Martin