Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

XML at Amazon

(Page 1 of 2)
> >
Quote Reply
XML at Amazon
If you are an amazon.com associate, you may have noticed that you are able to get xml data from them about certain products. Up to now, this was restricted to "browsing" or "searching", i.e you would get data about a few items, and you didn't really have control over what you get.

This has been changed recently (it's still in beta, as far as I can see) to also allow for product specific information. You enter an ASIN number (unique product identifcation), and you get an XML record of this product.

This is great news for Links SQL owners, who like me, feature some resources (books) which link to amazon.com. It basically means that you can display up-to date information, images, prices about the products.

Basically, you will be able to set up a book store (or any product they sell), and you will always have the latest info about the products.

I will think about how I can integrate this precisely into my site. Since I am using static pages, I was thinking of building (yet another) plugin, that fetches information about all your amazon.com related links and stores them in the links table. For dynamic page, you might be able to fetch the info in real time from the amazon server, but I don't know if that's a good idea, since you would be relying on them....

If you have suggestions. let me know.

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] XML at Amazon In reply to
Excellent news! About time - too!! Thanks for the update.

This is yet another excuse to go playing with XML::Twig. Marvellous. :-)

- wil
Quote Reply
Re: [Wil] XML at Amazon In reply to
I was trying with XML simple, that seems to do the job just fine.

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] XML at Amazon In reply to
Ugh. XML::Simple is not good. It has a few bugs in it's parser, mainly it's terrible at handling whitespaces.

XML::Twig really really rocks, and you should consider giving it a go. :-)

- wil
Quote Reply
Re: [Wil] XML at Amazon In reply to
The XML from amazon seem to be really simple. I also read about the whitespace bugs, but this seems to be more of a problem if you want to output XML. I am just parsing it, and extracting the data.

I'll have a look at XML::Twig anyway....

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] XML at Amazon In reply to
Yeah. I guess it's OK for that. I kinda like the forcearray option of XML::Simple too. That's a neat trick.

Cheers

- wil
Quote Reply
Re: [Wil] XML at Amazon In reply to
This is really amazing!!! I have been playing with it, and I can get all product information and put it into my Links database in no time.

Basically, I have added a field 'amazon_asin'. Then I select all records where 'amazon_asin' is not empty, fetch the info from amazon, and update my links database.

Next thing I will do: automate the fetching of the images from amazon, in order to store them locally.

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] XML at Amazon In reply to
Great stuff! Isn't XML wonderful?!! I'm in love with it. :-)

- wil
Quote Reply
Re: [Wil] XML at Amazon In reply to
Yes, it's great. You could of course do the same thing by parsing the amazon.com HTML, but it's so much more hassle, and when something changes in the HTML, you have to rewrite your pattern matching expressions....

A question about fetching images: should the automatic image downloader behave like a 'nice' robot, i.e. wait for a minute between the requests, read a robots.txt etc?

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] XML at Amazon In reply to
Yes, it should, or if you're going to start using LWP::Parallel::* then the Amazon netadmin will most likely ban your IP fairly soon, and that wouldn't be much use to you.

You should follow the guidelines as much as you can. After all, if it was your site, you'd apprciate spiders behaving themselves, so I think you should respect other sites the same. Just my two cents here, mind ..

- wil
Quote Reply
Re: [yogi] XML at Amazon In reply to
I have been hoping for something like this, and when I saw the announcement, I thought about jumping on it. It's actually sort of my #2 priority at the moment. I always wanted to be able to store only the AISN (ISBN) number of a book, and some brief description/identification information, but then yank the amazon, b&N, or other seller information, and display it on the page.

I started something like this awhile back, but there was no XML feed, and the parsing problem was too great.

I'll look into it again, since several of my sites are really book/information sites, and this would be wonderful!


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] XML at Amazon In reply to
Yes, isn't it nice.

At the moment the info you get is:

'release_date'
'title'
'our_price'
'small_image'
'list_price'
'tagged_url'
'image'
'asin'
'author'
'availability'
'binding'

I'll make a plugin for this (which you probably won't need).

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] XML at Amazon In reply to
Hi, where can i get more information on amazon.com xml service

Thanks

Wayne
Quote Reply
Re: [waynexu] XML at Amazon In reply to
http://www.amazon.com/webservices

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] XML at Amazon In reply to
Hi,

Just wondering whether you ever wrote this plugin?

Laura.
The UK High Street
Quote Reply
Re: [afinlr] XML at Amazon In reply to
Yes, I wrote it, but never released it.....

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] XML at Amazon In reply to
Well I wonder if you could just give me some hints?

I'm not specifically interested in Amazon but I would like to be able to read other xml feeds into my database. I learnt perl by writing price comparison engines so I do know how to parse html - I quickly got fed up with the sites changing the format of their pages every few weeks so I can see the benefits of xml. However, having read a bit about xml I'm still sure that I'm missing something. I'm guessing that there is more to it than just parsing the xml feed in the same way that I would do an html page but I can't seem to find that crucial next step. I have tried to find examples on the web but they all seem to be much more complicated than I need - any clues? A link to a good website would be helpful.

Thanks,

Laura.
The UK High Street
Quote Reply
Re: [afinlr] XML at Amazon In reply to
I'm using XML::Simple to parse the xml feed. This module exports a function XMLin(), which takes as an argument an xml expression, and returns a corresponding perl data structure. No need to parse the XML....

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] XML at Amazon In reply to
Blush Not sure what I was searching for before! A quick search for 'xml simple' on google gave lots of helpful sites.

Thanks.
Quote Reply
Re: [afinlr] XML at Amazon In reply to
Could this be used on any XML file? I have a news xml I would like to parse but cannot figure out. Any chance of getting a look at this script or a copy to play around with??
Thanks,

</not a clue>
Quote Reply
Re: [Kilroy] XML at Amazon In reply to
This is a link to a free script I found that uses the Amazon xml feed which you could play around with (nothing to do with LinksSQL but it might give you some clues):

http://www.cgiexpo.com/files/amazonxml.html

Laura.
The UK High Street
Quote Reply
Re: [afinlr] XML at Amazon In reply to
Hi,

any news about an XML-Import-Plugin???

What about a plugin to import XML-data an general??

Example:

XML-Data-File:

....

<product>

<brand>bslskd</brand>

<product_name>DVD</product_name>

<description>sdjfjdskjdfgsdksjdgsk</description>

<price>34,34</price>

</product>

.....



Plugin-User/Admin-Interface:

Input Data-Set-TAG : product *)

1. Data-Tag : brand Insert into column : myLinksSQLTableColumn_brand

2. Data-Tag : product_name Insert into column : myLinksSQLTableColumn_product_name

3. Data-Tag : description Insert into column : myLinksSQLTableColumn_description

4. Data-Tag : price Insert into column : myLinksSQLTableColumn_price

.....

Preview || Do (<=Submit-Buttons)

*) = User/admin-Input



It's just an idea, but such a plugin would be extremely helpful (also for DBManSQL)

Regards,
Manu

Shopping Portal Shop-Netz.de® | Partnerprogramme | Flugreisen & Billigflüge | KESTERMEDIA e.K. | European Affiliate Marketing Forum.
Quote Reply
Re: [ManuGermany] XML at Amazon In reply to
Hi,

I am working on it Wink. (Keep getting sidetracked.) At the moment it is following exactly the format you have suggested but I think that it may be better to put the correspondences for each xml feed into a file as I am assuming that you would need to update the database quite often - may a cron update - so I'm still fiddling with the structure. As soon as I have something that works I'll send it to you to try out.

Laura.
The UK High Street
Quote Reply
Re: [afinlr] XML at Amazon In reply to
Wow!

Yeah that would be great and your suggestions are quite right but a step further than I was thinking (for getting started Wink )



By the way, do you remember we've talked about a product-search-function?

I've been working hard on it and a first beta is online now at my website:

http://www.shop-netz.de/...roduktname&mh=15

I'm using DBManSQL and an import-script (more or less written by myself) to import product-data from csv-files.

Using DBMan SQL isn't necessary for I use it only for template-reasons (and because I was so stupid to buy it Tongue). When I bought DBMan SQL I thought it would be much better, but it isn't. It has a extremly poor documentation and gives you more restrictions to what you can't do with databases than what you can.

So for getting started with a product-database it is better to set up a database without using DBManSQL.

Regards,
Manu

Shopping Portal Shop-Netz.de® | Partnerprogramme | Flugreisen & Billigflüge | KESTERMEDIA e.K. | European Affiliate Marketing Forum.
Quote Reply
Re: [ManuGermany] XML at Amazon In reply to
I like your search. I'm not sure how DBMan SQL works - would it be possible to use this search with Links?

I thought I'd better let you know that the work on the xml plugin will be a bit delayed as I've just decided to go to Australia for a few weeks Cool - can't wait to get away from this depressing weather!

Laura.
> >