From: Dan Scott Date: Sun, 13 May 2018 14:59:24 +0000 (-0400) Subject: LP#1666987: Include a user-agent to build the relator map X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=f0572477da5b57f64dbf16d03578d853ffe932a7;p=evergreen%2Fpines.git LP#1666987: Include a user-agent to build the relator map loc.gov started using Cloudflare protection to block HTTP access from default user agents, so identify ourselves as an Evergreen user agent to restore our access. Long term we should evolve to using the linked open data access method via id.loc.gov but let's get this working first. Signed-off-by: Dan Scott Signed-off-by: Dan Wells --- diff --git a/build/tools/relator_map b/build/tools/relator_map index 742348248f..dc949b1e33 100755 --- a/build/tools/relator_map +++ b/build/tools/relator_map @@ -4,9 +4,12 @@ use warnings; use XML::LibXML; use XML::LibXML::Reader; -use LWP::Simple; +use LWP::Simple qw($ua get); use Data::Dumper; +# loc.gov blocks basic user agents now +$ua->agent('Evergreen/3.1'); + my %relator; my $code = 0; my $fullname = 0;