![]() |
|
go ahead... be a heretic | |
PerlMonks |
WWW::Mechanize and proxy with username/passwordby perlhack (Acolyte) |
on Jun 26, 2003 at 17:07 UTC ( #269319=perlquestion: print w/replies, xml ) | Need Help?? |
perlhack has asked for the wisdom of the Perl Monks concerning the following question:
Hello, I am trying to get WWW::Mechanize to run while at work. To get out to the internet from our web browser we use a proxy along with a username/password, ie. the first time I bring up my web browser to an external web address I enter my username and password and the proxy lets me out to external internet addresses. In the past I would use LWP::UserAgent to get an external web page with the following script:
Although LWP::UserAgent says it can handle a proxy I couldn't figure out a way to get it to work with a proxy that expects a username and password and somehow found in a web search something similar to how the above scripts works. Ok, now I am trying to use WWW::Mechanize and it says to handle a proxy it relies or leverages on LWP::UserAgent for this. I can replace LWP::UserAgent with WWW::Mechanize in the above script to fetch a web page fine but the other aspects of WWW::Mechanize such as "following" a link, "click", etc. will get denied by the proxy as they dont have the URI and HTTP::Request stuff happening to them. Has anyone ever gotten LWP::UserAgent to work with a proxy with username/password without resorting to the use of URI and HTTP::Request like above as if I can do this I then think WWW::Mechanize would work similarly? Thanks, perlhack
Back to
Seekers of Perl Wisdom
|
|