[英]Google Docs importXML from Amazon.com error
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.我正在尝试从 Amazon.com 中抓取产品价格的数据,但无论我尝试什么,我似乎都无法让它发挥作用。 The error it keeps throwing is
它不断抛出的错误是
Imported XML content can not be parsed
导入的 XML 内容无法解析
My formula is:我的公式是:
=importxml(hyperlink(concatenate("http://",L$1, "/dp/", $B2)),"//*[@id='priceblock_ourprice']")
L1 is the geography (ex: "amazon.com") L1 是地理位置(例如:“amazon.com”)
B2 is the ASIN (ex: "B00ICR1UB6") B2 是 ASIN(例如:“B00ICR1UB6”)
This same formula works just fine across all other geographies, but for some reason it just won't work on.com同样的公式在所有其他地区都适用,但由于某种原因,它在其他地区不起作用。com
这为我工作:
=importxml(hyperlink(concatenate("AMAZON_PRODUCT_PAGE_URL_HERE")),"//*[@id='priceblock_ourprice']")
Same issue here. 这里同样的问题。 Can't make any importxml formula work with amazon.com.
无法使任何importxml公式与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. 例如:
=IMPORTXML(Amazon-product-page-url,"//a[@id='brand']")
使用来自SEO Tools for Excel的公式“ XPathOnUrl”可以很好地工作,但不适用于GDocs。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.