[REL] [EN] [BETA] Amazon[.com|.co.uk|.de|.ca|.fr|.co.jp]

If you made a script you can offer it to the others here, or ask help to improve it. You can also report here bugs & problems with existing scripts.
Post Reply
THEMike
Posts: 13
Joined: 2006-07-11 17:51:16

[REL] [EN] [BETA] Amazon[.com|.co.uk|.de|.ca|.fr|.co.jp]

Post by THEMike »

Hi,

I have just finished a beta release of a new Amazon script.

This script uses the Amazon Web Services interface instead of relying on parsing the public web site HTML. AS such, it won't be constantly broken by UI changes made by the Amazon development team.

Furthermore, the script supports configuration to allow you to use the amazon of your choice. There are several regional amazon sites that support the amazon web services API, and this script will work with any of them. These are:

Amazon.com - Global/US
Amazon.co.uk - UK
Amazon.de - Germany
Amazon.ca - Canada
Amazon.co.jp - Japan
Amazon.fr - France

Simply use the script options in the top right corner of the script dialogue to change the Amazon that will be used for your search.

Additionally, you can set an option to change the script to prompt you for a title to search on instead of the title of your movie, and configure which size image to import.

The script defaults to Medium Images, No Prompt and Amazon.com search engine.

It populates the title, rating, image and URL. I intend to expand this to support year and length at least. I may extend further to editorial and actors if I have time, but since I don't care about that data myself, this is unlikely.

The script is currently English language interface, however, I would appreciate submitted translations and I will then appropriately internationalise it.

The latest Beta version (0.1) can be found here:
http://fuckingbrit.com/backend/Amazonws.ifs

Please note, the script will move location at some point in the not to distant future when I re-organise my website slightly.

Cheers,

Mike
THEMike
Posts: 13
Joined: 2006-07-11 17:51:16

Post by THEMike »

Terribly sorry, appears when I uploaded it earlier I put it in a sub-folder. The link above now works correctly. I'm now fixing a load of my AMC entries using it to give it a pretty good amazon.co.uk thrashing.
antp
Site Admin
Posts: 9629
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

Nice project, that's indeed a good choice to use that web service interface.
Shall I include your script with the others, or do you prefer that some people test it here on the forum before releasing that script?
THEMike
Posts: 13
Joined: 2006-07-11 17:51:16

Post by THEMike »

I'm already aware of a couple of issues that I need to work out, I shall let you know when I think it's a release quality item.
KoVaR
Posts: 7
Joined: 2004-12-26 13:54:03

Post by KoVaR »

so....
any updates :) ?
THEMike
Posts: 13
Joined: 2006-07-11 17:51:16

Post by THEMike »

The only two issues I am aware of with the above script are:

1) If there is no image in the returned data for a selected item, it crashes.
2) I use the URL thing to pass the item id around, which means you can't view page in a meaningful way.

For 1, I can't now find an item on Amazon that has this issue so it's impossible for me to re-create and fix at the moment.

With 2, I can't find a better way of identifying what the user selects from the list view.

Has anyone had any other problems? If not I'm happy for it to be released, unless someone can give me a DVD name and item topick that I can use to recreate (and fix) 1
slasher
Posts: 13
Joined: 2007-05-05 18:07:33

Post by slasher »

THEMike wrote:1) If there is no image in the returned data for a selected item, it crashes.
I don't know if I undestood correctly what you said... But, for instance, try searching on Amazon.com for "I'm not there". It hasn't have an image and the script crashes.

Hope that it helps.

Bye!
THEMike
Posts: 13
Joined: 2006-07-11 17:51:16

Post by THEMike »

Excellent!

Thanks for that, issue now fixed.

I've also resolved the other issue with a horrible nasty mean hack.

But it works.

So, unless anyone knows of any other faults, I'm happy for it to be released.

Cheers,

Mike
azer
Posts: 12
Joined: 2007-04-14 15:17:33

Post by azer »

Verry nice script :D
But I found a bug, try searching for "Logan's Run" without the qoutes and select choice number 2 or "Robo Vampire" and choice 2 or 3.
It seems like it's the problem with dvds without covers. But the script shuffles the order of the two first dvds around it seems. But the funny thing is there are two links not working with robo vampire in the script, but there are only on missing cover on the site.
THEMike
Posts: 13
Joined: 2006-07-11 17:51:16

Post by THEMike »

I can't recreate the problem with the latest version of the script. Try downloading from this url:

http://fuckingbrit.com/backend/Amazonws ... 0801121827

and testing those movies again.
azer
Posts: 12
Joined: 2007-04-14 15:17:33

Post by azer »

I was using the one from www.antp.be/temp/scripts/. This one works nicely.
joe935
Posts: 33
Joined: 2006-09-19 20:25:31
Location: Smith Mountain Lake, Va. USA

Post by joe935 »

I just tried your script with "I'm not there" and i found that allmovie.ifs script returned more information than amazonws.ifs
THEMike
Posts: 13
Joined: 2006-07-11 17:51:16

Post by THEMike »

It populates the title, rating, image and URL. I intend to expand this to support year and length at least. I may extend further to editorial and actors if I have time, but since I don't care about that data myself, this is unlikely.
Yeah, as I noted originally, I only do the title, rating, image and URL (actually, not sure I do rating). It could be expanded to do other fields, but I'm not interested in them so haven't spent the time to do so.

I'm sure the allmovie site/script provides more. But does it work with all versions of amazon via an unchanging web services API or is it scraping a single site?
joe935
Posts: 33
Joined: 2006-09-19 20:25:31
Location: Smith Mountain Lake, Va. USA

Post by joe935 »

Sorry, I thought you had improved it to include more info.
bad4u
Posts: 1148
Joined: 2006-12-11 22:54:46

Post by bad4u »

Hi Mike.

Nice idea, nice work.
Using the API seems quite complicated, but you did really nice basics for an interesting solution.

Here's my contribution, the missing code for import of length and year, and in addition the director ;)

Code: Select all

      // Director
      if oXmlElement.Items.GetItemNamed('ItemAttributes').Items.GetItemNamed('Director') <> nil then
        SetField(fieldDirector, oXmlElement.Items.GetItemNamed('ItemAttributes').Items.GetItemNamed('Director').Value);
      // Year
      if oXmlElement.Items.GetItemNamed('ItemAttributes').Items.GetItemNamed('ReleaseDate') <> nil then
        SetField(fieldYear, Copy(oXmlElement.Items.GetItemNamed('ItemAttributes').Items.GetItemNamed('ReleaseDate').Value, 0, 4));
      // Length
      if oXmlElement.Items.GetItemNamed('ItemAttributes').Items.GetItemNamed('RunningTime') <> nil then
        SetField(fieldLength, oXmlElement.Items.GetItemNamed('ItemAttributes').Items.GetItemNamed('RunningTime').Value);
There is still a small 'bug' - if there are more directors than one, only the last one from the list will be imported yet. No problems if a value is missing on website/API.
Post Reply