- print STDERR "Error downloading a file from archive.\n";
- }
-
- return $file;
-}
-
-sub download_mw_mediafile {
- my $filename = shift;
-
- $mediawiki->{config}->{files_url} = $url;
-
- my $file_content = $mediawiki->download( { title => $filename } );
- if (!defined($file_content)) {
- print STDERR "\tFile \'$filename\' could not be downloaded.\n";
- exit 1;
- } elsif ($file_content eq "") {
- print STDERR "\tFile \'$filename\' does not exist on the wiki.\n";
+ print STDERR "Error downloading mediafile from :\n";
+ print STDERR "URL: $url\n";
+ print STDERR "Server response: " . $response->code . " " . $response->message . "\n";