Solved

Dynamically pull Album Art from Amazon

Posted on 2006-06-27
3
370 Views
Last Modified: 2006-11-18
Hello I would like to dynamically pull in album art from amazon for my personal music server.
I have come to the point where i understand amazon's link structure to the images.   This information can be found here (and many other places): http://aaugh.com/imageabuse.html

The actual URL looks like the following:
http://images.amazon.com/images/P/0762423374.01._PE20_SCMZZZZZZZ_.jpg

I could get this working but here is the cather, I dont want to look up every album to obtain the
ASIN.   In the example above the ASIN is 0762423374.   This is the isbn number (stripped of slashes for books), but there is not a set algorithm for calculating the ASIN for a album.

So...
1) Prove me wrong and find the ASIN algorithm based on Artist/Album
                or
2) Provide an alternative method.

Again i want to do this dynamically (nothing stored).  Here is a website that is doing something
similar to what i want (but i dont want to enter information, just pass variables):
http://art4itunes.com/getart/uploadtracks.php

Thanks and goodluck...


0
Comment
Question by:epiphone32
3 Comments
 
LVL 37

Expert Comment

by:Harisha M G
ID: 16995710
Hi, try this:

<?
    $str = file_get_contents("http://aaugh.com/imageabuse.html");

    preg_match_all("#\b\d{10}\b#",$str,$matches);
    $ASIN = array_unique($matches[0]);
    print_r($ASIN);
?>


---
Harish
0
 
LVL 7

Accepted Solution

by:
CraigHarris earned 500 total points
ID: 16996128
Amazon provide access to almost all over their stuff via web services: http://www.amazon.com/gp/browse.html/103-6589174-6084642?node=3435361
0
 
LVL 18

Expert Comment

by:Mark Gilbert
ID: 17018773
There is no specific alogithm for how Amazon creates ASINs.  ASINs are uniquely identifiable codes that are used to identify every single product on their website.  Origionally, as they were solely book sellers, their ASINs were actually the ISBN numbers from the books as you have already identified.  You will find that the ASINs for every book listed are identical to the ISBNs without the dashes (-).  

As albumns don't have ISBN numbers, Amazon has to: either manually, or through some automated incriment number in a database, assign an ASIN to an item.  If it's a book they use the isbn, if it's any thing else then it's a random/auto_incrimental number.

Further more, to be able to retrieve information from Amazon's site, I would go with what craig suggested and signup for their web services.  

Hope this helps.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question