Comment 1 for bug 1748537

Revision history for this message
Dan Wells (dbw2) wrote :

We are experiencing this as well. I am actually seeing 403 errors, and it appears the OpenLibrary API is blocking LWP at the user-agent level. Here are some quick tests which make me believe this:

perl -e 'use Data::Dumper; use LWP::UserAgent; my $agent = LWP::UserAgent->new(); my $res = $agent->get("http://openlibrary.org/api/volumes/brief/json/isbn:130608198X"); print Dumper($res);'

(returns 403 for me)

perl -e 'use Data::Dumper; use LWP::UserAgent; my $agent = LWP::UserAgent->new(); $agent->agent("Evergreen_ILS"); my $res = $agent->get("http://openlibrary.org/api/volumes/brief/json/isbn:130608198X"); print Dumper($res);'

(works fine for me)

In a quick search, I could not find any information with this as a new policy, but I didn't look very hard. In any case, this would be a simple fix, but:

a) Do we want to supply a custom/spoofed UA string?
b) If we do, what should it be?

(Also note, AddedContent has a built in error retry timeout, 10 minutes by default. So, if you apply this to AddedContent.pm as a fix, you may not see images for another 10 minutes. (You will see "added content lookup disabled" instead.))