--- get_enclosures.pl Mon Sep 20 13:44:31 2004 +++ nm_get_enclosures.pl Mon Sep 20 13:42:42 2004 @@ -129,6 +129,7 @@ $url = $item->{enclosure}[0]->{url}; $type = $item->{enclosure}[0]->{type}; push @{$seen_urls}, $url; + my $coral_url=$url; #print "$url has cache value ".$cache->{$url}."\n"; if ($cache->{$url} && $cache->{$url} !~ m/\D/) { #print "Going to convert cache timestamp ".$cache->{$url}."\n"; @@ -156,11 +157,22 @@ } while (-e $url_file); #print "Settled on $url_file\n"; } - - print "Getting $url for $title to file $url_file\n"; + + if ( $coral_url !~ /nyud.net:8090/ && $coral_url =~ s|http://(.*?)/(.*)|http://$1.nyud.net:8090/$2|) + { + print "Got coralized: $coral_url\n"; + } + + print "Getting $coral_url for $title to file $url_file\n"; $mirrorStartTime = time(); - $status = mirror($url, $url_file); + $status = mirror($coral_url, $url_file); + if ($status != 200 && $url ne $coral_url ) { + #try again, not coralized + $mirrorStartTime = time(); + $status = mirror($url, $url_file); + + } if ($status == 200 ) { $mirrorElapsedTime = time() - $mirrorStartTime; $size = (stat($url_file))[7];