I am having trouble using the credentials agent for WWW:Mechanize to access and web scrape a site that requires NTLM authentication. I read online that the credentials agent requires 4 arguments: a base, realm, username and password. I'm not sure what to use for the base or realm so an example of these would be very helpful. When I run my code I get an error unauthorized on the line with the $url get. Any help would be appreciated
#!/usr/bin/perl
use strict;
use warnings;
use WWW::Mechanize;
use HTML::TokeParser;
my $url= shift || "mywebsite.com";
my $agent = WWW::Mechanize->new( autocheck => 1 );
$agent->credentials ( "proxy:port", '', 'domain/username', 'password' );
$agent->proxy(['https', 'http', 'ftp'], 'proxy:port');
$agent->get( $url );
print $agent->content();