Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^5: How do I access a password protected site and access data?

by marto (Cardinal)
on Jul 11, 2005 at 08:26 UTC ( [id://473871]=note: print w/replies, xml ) Need Help??


in reply to Re^4: 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,

Have you tried ignoring the error and installing the module?
It may be worth while having a read at the great tutorial A Guide to Installing Modules, written by tachyon.

Hope this helps,

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

Replies are listed 'Best First'.
Re^6: How do I access a password protected site and access data?
by jaydon (Novice) on Jul 11, 2005 at 16:10 UTC
    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!

      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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://473871]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2024-04-24 21:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found