[Alexandria-list] Can't find _any_ book any more

Robert Waldner waldner at waldner.priv.at
Mon Mar 27 14:45:45 EST 2006


On Mon, 27 Mar 2006 19:08:19 +0200, Eric Tanguy writes:
>In this distribution the file is
>in /usr/lib/site_ruby/1.8/amazon/search.rb but if i change
>xml.amazon.com to webservices.amazon.com it works but only if i select
>us (which is normal) but it seems in webservices.amazon.com some french
>books are not present. If i try to change xml.amazon.fr to
>webservices.amazon.fr, it does not work and i can't retrieve books.

It worked for .com and .de for me.

Try commenting out all book-providers but amazon around line 233 in 
 /usr/lib/ruby/1.8/alexandria/book_providers.rb (of course, the exact 
 file location may vary for you). This should get you an error box with 
 "302" when looking up books.

Then, before looking up books, run ethereal (as root), let it capture 
 on your outgoing interface with a filter of "port 80". When you look 
 at the packets via "follow TCP stream", you should see where it goes 
 wrong. But since this is somewhat intriguing, I'll do it for you this
 time.

It seems that even if I select "fr" as language, Ruby/amazon tries to 
 look up via amazon.com:

.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
GET /onca/xml3?t=calibanorg-20&AsinSearch=2848930284&f=xml&type=heavy&dev-t=1XQCB3VJ5VW8P8FKFDG2&locale=fr HTTP/1.1
Accept: */*
User-Agent: Ruby/Amazon 0.9.0
Host: webservices.amazon.com

HTTP/1.1 302 MovedTemporarily
Date: Mon, 27 Mar 2006 19:32:44 GMT
Server: Server
x-amz-id-1: 0SZFY39YG2DMV339SXF8
x-amz-id-2: 78FPJQeiegGyqnbtcZT47k7vlk77uz2J
Location: http://webservices.amazon.fr/onca/xml3?t=calibanorg-20&AsinSearch=2848930284&f=xml&type=heavy&dev-t=1XQCB3VJ5VW8P8FKFDG2&locale=fr
nnCoection: close
Transfer-Encoding: chunked
Content-Type: text/html; charset=UTF-8

0
.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.

Now if I change xml.amazon.*com* to webservices.amazon.*fr* in 
 /usr/lib/ruby/1.8/amazon/search.rb it works. Even though I'd guess it 
 should've used xml.amazon.fr in the first place:

.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
    LOCALES = { 'ca' => 'xml.amazon.ca',
                'de' => 'xml-eu.amazon.com',
                'fr' => 'xml.amazon.fr',
                'jp' => 'xml.amazon.co.jp',
                'uk' => 'xml-eu.amazon.com',
                'us' => 'webservices.amazon.fr',
    }
.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.

Don't ask /me/ why - I'm a sysadmin, not a programmer. My job is just to 
 make stuff work, whatever fugly workarounds it takes ;-)

cheers,
&rw
-- 
-- I still think the fastest way to get wholesale IPv6 adoption
-- is to write a pr0n server that serves thumbnails over IPv[46]
-- and full-size images over IPv6 *only*.               - Ingvar


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/alexandria-list/attachments/20060327/ff7d7013/attachment.bin 


More information about the Alexandria-list mailing list