I'm trying to get catalog images from but I'm not having much luck. The current code displays 500 and 433 errors. Does anyone know how I may get images from the urls below? Thanks.
https://mms.image.mckesson.com/CumulusWeb/Images/High_Res/49176.jpg
https://mms.image.mckesson.com/CumulusWeb/Images/High_Res/803186.jpg
use warnings;
use strict;
# use Image::Grab;
use LWP::Simple;
open (IN, '< McKesson_Items_test.csv') or die ("Can't open the input f
+ile $!");
while (<IN>){
chomp;
my($item_number, $sku, $desc) = split /\,/;
#print $item_number, $sku;
my $url = 'https://mms.image.mckesson.com/CumulusWeb/Images/High_R
+es/' . $sku . '.jpg';
#my $ua = LWP::UserAgent->new(ssl_opts => { verify_hostname => 0 }
+);
#my $req = HTTP::Request->new("GET", $url);
#my $rep = $ua->request($req);
#print $rep->status_line;
use LWP 5.64;
my $browser = LWP::UserAgent->new;
my $response = $browser->get($url);
die "Error at $url\n ", $response->status_line, "\n Aborting"
unless $response->is_success;
print "Whee, it worked! I got that ",
$response->content_type, " document!\n";
#my $path = 'Images\\' . $item_number . '.jpg';
#my $path = $item_number . '.jpg';
#print " $url, $path\n";
#getstore($url, $path) or die "Can't download: $@\n";
}