?
Solved

Dynamically pull Album Art from Amazon

Posted on 2006-06-27
3
Medium Priority
?
372 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 2000 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

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them.

Question has a verified solution.

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

Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
There are times when I have encountered the need to decompress a response from a PHP request. This is how it's done, but you must have control of the request and you can set the Accept-Encoding header.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to count occurrences of each item in an array.
Suggested Courses

764 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