Perl Monk, Perl Meditation | |
PerlMonks |
Confused about LWP, Mechanize and UserAgentby Anonymous Monk |
on Jun 07, 2006 at 19:29 UTC ( [id://554125]=perlquestion: print w/replies, xml ) | Need Help?? |
Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I'm confused as to how to access the web pages on a website that I need to parse. I have the username and password and I know I need to use the libraries above (useragent, mechanize, simple), but I'm seeing so many different ways of doing things and everything I'm trying is not working.
If the name of the site is www.mydomain.com and on this page there is a login screen (username, password) what do I need to add to my program so that it 'logs in'. My program grabs certain pages from the site and parses them. What I've been doing is passing the LWP::Simple library url's that look like this: http://www.mydomain.com/program.cgi?var1=apples&var2=bananas It's been working great and I'm able to get many of the pages on this site. However, like I mentioned above, some of the pages on this site are 'restricted' and I need to 'login' using my parsing program so that the 'get' command will work. Can anyone give me a good, simple example of how to login so that I can use the LWP::Simple library on restricted pages? I just want to be able to use LWP::Simple without any access problems.
Back to
Seekers of Perl Wisdom
|
|