0
votes

I'm trying to scrape data from Amazon.com for product prices, and no matter what I try I just can't seem to get it to work. The error it keeps throwing is "Imported XML content can not be parsed"

My formula is:

=importxml(hyperlink(concatenate("http://",L$1, "/dp/", $B2)),"//*[@id='priceblock_ourprice']")

L1 is the geography (ex: "amazon.com")
B2 is the ASIN (ex: "B00ICR1UB6")

This same formula works just fine across all other geographies, but for some reason it just won't work on .com

2
Didn't see a google spreadsheet tag before, and figured it was fairly related. Fixed. - Sam Morgan

2 Answers

0
votes

This worked for me:

=importxml(hyperlink(concatenate("AMAZON_PRODUCT_PAGE_URL_HERE")),"//*[@id='priceblock_ourprice']")
0
votes

Same issue here. Can't make any importxml formula work with amazon.com. For example: =IMPORTXML(Amazon-product-page-url,"//a[@id='brand']") It works perfectly fine using the formula "XPathOnUrl" from SEO Tools for Excel but not in GDocs.