4 ms·
edit: it doesn't download the highest available resolution... This Perl script should get most of the images (but it would probably be better to save them in t
by awqrre 10y ago
edit: it doesn't download the highest available resolution...
This Perl script should get most of the images (but it would probably be better to save them in the original sub-directories):
use strict;
use warnings;
use LWP::Simple;
use JSON qw(from_json);
my $url = "http://metmuseum.org/api/collection/collectionlisting?offset=";
my $args = "&pageSize=0&perPage=100&sortBy=Relevance&sortOrder=asc";
my $offset = 0;
while ($offset < 5000) {
my $decoded = from_json(get($url.$offset.$args));
$offset = $offset + 100;
my @results = @{ $decoded->{'results'} };
foreach my $i ( @results ) {
my $filename = $i->{"largeImage"};
my $title = $i->{"title"};
print "Status: ".getstore("http://images.metmuseum.org/CRDImages/".$filename,$title.".jpg")." ".$filename. "\n";
}
}