R
Roedy Green
On my website I have links to 20 different bookstores. The problem
is, there is no guarantee all the bookstores actually carry any given
book. I wanted to grey-out links to bookstores that don't for now
carry that particular book.
This means probing every bookstore with every ISBN to see if they have
it. I discovered I needed an average of 8 marker strings to analyse
the response There are about 4 different ways they say they have the
book and 4 to say they do not. I found this by trial and error,
adding more and more strings and seeing if there were responses that
could not be categorised, then translating and examining the responses
for likely markers, then looking at the original. This was complicated
somewhat since some of the bookstores are in German, French, Italian
and Spanish.
As the bookstores change their wordings, I will have to keep adjusting
my program to track.
All his would be so much easier if the bookstores would offer an
alternate computer-friendly api. You could give them an ISBN, and
they could give you back some XML, JSON, CSV etc, with a single Yes/No
instock field. It would take them all of an hour to cook something
up. Sometimes they do it, but make it so complicated and so volatile
you might as well screenscrape.
Ditto companies that sell posters, or sell anything else via
affiliates need that sort of API.
--
Roedy Green Canadian Mind Products
http://mindprod.com
It should not be considered an error when the user starts something
already started or stops something already stopped. This applies
to browsers, services, editors... It is inexcusable to
punish the user by requiring some elaborate sequence to atone,
e.g. open the task editor, find and kill some processes.
is, there is no guarantee all the bookstores actually carry any given
book. I wanted to grey-out links to bookstores that don't for now
carry that particular book.
This means probing every bookstore with every ISBN to see if they have
it. I discovered I needed an average of 8 marker strings to analyse
the response There are about 4 different ways they say they have the
book and 4 to say they do not. I found this by trial and error,
adding more and more strings and seeing if there were responses that
could not be categorised, then translating and examining the responses
for likely markers, then looking at the original. This was complicated
somewhat since some of the bookstores are in German, French, Italian
and Spanish.
As the bookstores change their wordings, I will have to keep adjusting
my program to track.
All his would be so much easier if the bookstores would offer an
alternate computer-friendly api. You could give them an ISBN, and
they could give you back some XML, JSON, CSV etc, with a single Yes/No
instock field. It would take them all of an hour to cook something
up. Sometimes they do it, but make it so complicated and so volatile
you might as well screenscrape.
Ditto companies that sell posters, or sell anything else via
affiliates need that sort of API.
--
Roedy Green Canadian Mind Products
http://mindprod.com
It should not be considered an error when the user starts something
already started or stops something already stopped. This applies
to browsers, services, editors... It is inexcusable to
punish the user by requiring some elaborate sequence to atone,
e.g. open the task editor, find and kill some processes.