+ Reply to Thread
Results 1 to 7 of 7

Grabbing Image Url

  1. #1
    Registered User
    Join Date
    03-19-2011
    Location
    Detroit, Michigan
    MS-Off Ver
    Excel 2007
    Posts
    16

    Grabbing Image Url

    While working on my TV show spreadsheet, I was wondering if I could utilize some sort of formula for grabbing image urls. For each TV show season, I have a hyperlink that takes me to the products Amazon page. What I am hoping to do is pretty tricky:

    Is it possible that given the link, that I can obtain the image url shown on that page? For instance, I have a hyperlink for Trailer Park Boys Season 7. When I click it, it takes me to the following URL :

    http://www.amazon.com/exec/obidos/AS...dvdcomsales-20

    Once on that page, I am hoping to copy the image url of the main photo and paste it into a new cell.

    Not sure if this is possible, but some of the Excel gurus might be able to tackle this. Any help would be much appreciated!

  2. #2
    Registered User
    Join Date
    03-19-2011
    Location
    Detroit, Michigan
    MS-Off Ver
    Excel 2007
    Posts
    16

    Re: Grabbing Image Url

    Let's say that the hyperlink is in cell A1 and I wanted the Image URL for that show to be in B1...

  3. #3
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Grabbing Image Url

    It's certainly possible...however, Amazon.com web pages are rife with images and they all have cryptic, non-intuitive names. If you have a way of identifying the image name formulaically or with VBA code, please share it with us and we'll see what we can do.
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  4. #4
    Registered User
    Join Date
    03-19-2011
    Location
    Detroit, Michigan
    MS-Off Ver
    Excel 2007
    Posts
    16

    Re: Grabbing Image Url

    Hmmm...I'm a little out of my depth here. I was hoping that Amazon would sort their image urls based on predictive wording. I actually got the links as part of a copy and paste from another website. The link includes the ASIN numbers if that helps. Perhaps there is a way to track down an image attached to each ASIN number?

  5. #5
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Grabbing Image Url

    In the URL you posted, the ASIN is: B0014WAAE4

    On that web page, that number appears dozens of times. Here's a small sample of the code:

    <div id='main-image-caption' class='tiny'>&nbsp;</div><div id = 'thumbs-image' class='thumbs bottom' customFunctionName = 'ImageBlock.TwisterReArchModule.getAltsImageMarkup'><a href='http://www.amazon.com/gp/product/images/B0014WAAE4/ref=dp_otherviews?ie=UTF8&color_name=x' class='altThumb' target='AmazonHelp' onclick='return false' /><img class='border thumb0 selected' src='http://ecx.images-amazon.com/images/I/51XywMcPdVL._SS30_.jpg' data-index='0'></a><a href='/gp/customer-media/product-gallery/B0014WAAE4/ref=cm_ciu_pdp_images_0?ie=UTF8&index=0' class='ciuThumb'><img class='border thumb1' src='http://ecx.images-amazon.com/images/I/61ExOZ2ZPtL._SS30_.jpg' data-index='1'></a><a href='/gp/customer-media/product-gallery/B0014WAAE4/ref=cm_ciu_pdp_images_1?ie=UTF8&index=1' class='ciuThumb'><img class='border thumb2' src='http://ecx.images-amazon.com/images/I/61xV7T0uDuL._SS30_.jpg' data-index='2'></a><a href='/gp/customer-media/product-gallery/B0014WAAE4/ref=cm_ciu_pdp_images_2?ie=UTF8&index=2' class='ciuThumb'><img class='border thumb3' src='http://ecx.images-amazon.com/images/I/51AHSp8gSEL._SS30_.jpg' data-index='3'></a><a href='/gp/customer-media/product-gallery/B0014WAAE4/ref=cm_ciu_pdp_images_3?ie=UTF8&index=3' class='ciuThumb'><img class='border thumb4' src='http://ecx.images-amazon.com/images/I/51Fbc5nFgVL._SS30_.jpg' data-index='4'></a></div>

  6. #6
    Registered User
    Join Date
    03-19-2011
    Location
    Detroit, Michigan
    MS-Off Ver
    Excel 2007
    Posts
    16

    Re: Grabbing Image Url

    So I guess the question is, is there some sort of constant that can be predicted for each product image? What I am trying to do is have the image url inserted into the spreadsheet, which can then import the image onto a website once the excel file is uploaded. I tried the following url which didn't work :

    http://www.amazon.com/gp/product/images/B0014WAAE4

    The actual url that would work is :

    http://ecx.images-amazon.com/images/...VL._SS500_.jpg

    I just don't know how the two can be associated and integrated into some sort of formula. I'm really not that familiar with this type of stuff on Excel : (

  7. #7
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Grabbing Image Url

    The short answer is: They can't.
    The image url is:
    Please Login or Register  to view this content.
    Amazon has millions of images in its libraries and its web pages are built dynamically when accessed. As with most databases, objects are identified by unique identifiers. Descriptive names are associated with them when implemented on the web page. Consequently, you'd need to know the image name before you can try to download it.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Linking Image to a cell value, and display the selected image in new sheet
    By siva venkata in forum Excel General
    Replies: 12
    Last Post: 03-25-2014, 02:34 AM
  2. Replies: 2
    Last Post: 07-02-2013, 03:36 PM
  3. [SOLVED] VBA to send embedded image in email body- NOT USING THE ORGINAL IMAGE SOURCE
    By Coreyusa in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-27-2013, 06:48 PM
  4. excel 2010 VBA InsertPicInRange only makes shortcut to image instead of copy of image
    By ArjanSpit in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-10-2012, 02:57 PM
  5. Displaying and Updating Image Dynamically (ActiveX Image Control?)
    By VTHokie11 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-02-2011, 10:57 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1