Re: WWW:Mechanize and Proxies

2006-03-21 Thread David TV
Ok, that worked! Thanks a lot!

On 3/22/06, DePriest, Jason R. <[EMAIL PROTECTED]> wrote:
> David,
>
> You need to change your environment variables for the operating system.
>
> If you wanted to do it from within the script you could do something like 
> this:
> $ENV{HTTP_PROXY} = 'http://username:[EMAIL PROTECTED]:8080/'';
>
> On 3/9/06, David TV <> wrote:
> > Something keeps on failing... Here's the code:
> >
> > use strict;
> > use Data::Dumper;
> > use WWW::Mechanize;
> > use File::Basename;
> >
> > my $http_proxy = 'http://55.6.1.145:8080/';
> > my $http_proxy_pass = 'my_passwd';
> > my $http_proxy_user = 'username';
> >
> > my $m = WWW::Mechanize -> new or die "...ugly...";
> >
> > $m -> get ("http://www.despair.com/indem.html";) or die "...ugly...";
> >
> > my @top_links = @{$m -> links};
> >
> > print Data::Dumper -> Dump ( [\$m], [qw(\$m)] );
> >
> > This dumps the html page returned from the proxy saying that it needs
> > authentication (despite I populated both http username and password):
> > ot says (in a short way): "Unable to complete request:Access denied
> > due to authentication failure."
> >
> > - David
> >
>


--
Un saludo,

#
   David TV
  E-Mail: [EMAIL PROTECTED]
#

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: WWW:Mechanize and Proxies

2006-03-21 Thread DePriest, Jason R.
David,

You need to change your environment variables for the operating system.

If you wanted to do it from within the script you could do something like this:
$ENV{HTTP_PROXY} = 'http://username:[EMAIL PROTECTED]:8080/'';

On 3/9/06, David TV <> wrote:
> Something keeps on failing... Here's the code:
>
> use strict;
> use Data::Dumper;
> use WWW::Mechanize;
> use File::Basename;
>
> my $http_proxy = 'http://55.6.1.145:8080/';
> my $http_proxy_pass = 'my_passwd';
> my $http_proxy_user = 'username';
>
> my $m = WWW::Mechanize -> new or die "...ugly...";
>
> $m -> get ("http://www.despair.com/indem.html";) or die "...ugly...";
>
> my @top_links = @{$m -> links};
>
> print Data::Dumper -> Dump ( [\$m], [qw(\$m)] );
>
> This dumps the html page returned from the proxy saying that it needs
> authentication (despite I populated both http username and password):
> ot says (in a short way): "Unable to complete request:Access denied
> due to authentication failure."
>
> - David
>

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: WWW:Mechanize and Proxies

2006-03-09 Thread David TV
Something keeps on failing... Here's the code:

use strict;
use Data::Dumper;
use WWW::Mechanize;
use File::Basename;

my $http_proxy = 'http://55.6.1.145:8080/';
my $http_proxy_pass = 'my_passwd';
my $http_proxy_user = 'username';

my $m = WWW::Mechanize -> new or die "...ugly...";

$m -> get ("http://www.despair.com/indem.html";) or die "...ugly...";

my @top_links = @{$m -> links};

print Data::Dumper -> Dump ( [\$m], [qw(\$m)] );

This dumps the html page returned from the proxy saying that it needs
authentication (despite I populated both http username and password):
ot says (in a short way): "Unable to complete request:Access denied
due to authentication failure."

- David

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: WWW:Mechanize and Proxies

2006-03-09 Thread willem
David TV wrote:

>Hello there!
>
>Is there any way to force Mechanize to use/go through a proxy??
>
>Thanks in advance!!
>  
>
like with LWP::UserAgent.

it automatically calls $ua->env_proxy

... so ( from useragent docs )

Load proxy settings from *_proxy environment variables.  You might
specify proxies like this (sh-syntax):

  gopher_proxy=http://proxy.my.place/
  wais_proxy=http://proxy.my.place/
  no_proxy="localhost,my.domain"
  export gopher_proxy wais_proxy no_proxy

willem

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: WWW:Mechanize and Proxies

2006-03-09 Thread David TV
Thanks a lot!!!

On 3/9/06, willem <[EMAIL PROTECTED]> wrote:
> David TV wrote:
>
> >Hello there!
> >
> >Is there any way to force Mechanize to use/go through a proxy??
> >
> >Thanks in advance!!
> >
> >
> like with LWP::UserAgent.
>
> it automatically calls $ua->env_proxy
>
> ... so ( from useragent docs )
>
> Load proxy settings from *_proxy environment variables.  You might
> specify proxies like this (sh-syntax):
>
>   gopher_proxy=http://proxy.my.place/
>   wais_proxy=http://proxy.my.place/
>   no_proxy="localhost,my.domain"
>   export gopher_proxy wais_proxy no_proxy
>
> willem
>
>


--
Un saludo,

#
   David TV
  E-Mail: [EMAIL PROTECTED]
#

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


WWW:Mechanize and Proxies

2006-03-09 Thread David TV
Hello there!

Is there any way to force Mechanize to use/go through a proxy??

Thanks in advance!!

- David

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs