From 6ab80239372798e51742392533b35ed5e92a02af Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Wed, 9 Sep 2020 23:35:58 +0100 Subject: [PATCH] media-scraper: wip Signed-off-by: Ian Jackson --- library/wikimedia.toml | 6 +++--- media-scraper | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/library/wikimedia.toml b/library/wikimedia.toml index 98fa65dd..af29d138 100644 --- a/library/wikimedia.toml +++ b/library/wikimedia.toml @@ -12,11 +12,11 @@ category = "chess" files = """ blt45 a white bishop -adt45 a black knight +#adt45 a black knight """ [chess.scraper] method = "wikimedia" licences = [ "Cc-by-sa-3.0", "GFDL|migration=relicense" ] -url_prefix = "https://commons.wikimedia.org/wiki/File:Chess " -url_suffix = ".svg" +url_prefix = "https://commons.wikimedia.org/wiki/File:Chess_" +url_suffix = ".svg?action=raw" diff --git a/media-scraper b/media-scraper index 8967e806..65a82fda 100755 --- a/media-scraper +++ b/media-scraper @@ -1,6 +1,5 @@ #!/usr/bin/perl -w use strict; -use autodie; use POSIX; use TOML::Parser; @@ -14,7 +13,7 @@ our $max_rate = 2; # per second open DEBUG, ">&STDERR" or die $!; sub run_curl { - my (@curl) = (qw(curl), @_); + my (@curl) = (qw(curl -Ssf -L --proto-redir -all), @_); our $last_curl; $last_curl //= 0.; my $now = Time::HiRes::time; -- 2.30.2