Subject: | User agent required |
Date: | Sun, 22 May 2011 03:21:24 +0200 |
To: | bug-WWW-Discogs [...] rt.cpan.org |
From: | robotnik <doku.joeker [...] gmail.com> |
Error: 500 Client Refused
WWW-Discogs-0.10<http://search.cpan.org/CPAN/authors/id/L/LE/LEEDO/WWW-Discogs-0.10.tar.gz>
This is perl, v5.10.1 built for MSWin32-x86-multi-thread on Win 7.
--------------
Solution:
Due to recent api changes (I assume) the ua now needs to be set correctly.
Discogs.pm line 187
change to e.g.
my $res = $self->{ua}->get($url, 'Accept-Encoding' => 'gzip', 'User-Agent'
=> 'WWW-Discogs/0.10 +perl');
--------------
Setting ua in script didn't work, e.g.
my $client = WWW::Discogs->new(apikey => 'xxx', ua => 'WWW-Discogs/0.10
+perl');
Possibly needs further tweaks, saving images stopped working. At least basic
functionality can be restored with above line.
Cheers,
robotnik