ImportXML Google 表格从网站上挑选价格

ImportXML Google Sheets picking price from website

1.

2.

=IMPORTXML("https://www.amazon.in/Endless-EL-8201-Steel-Bike-Black/dp/B07MFY169J","//span[@class='currencyINR']/text()")

以上公式给出错误:

Imported content is empty.

对于 URL 1 和 2。我想要这些产品的进口价格。

对于第二个 URL,您尝试的方式不可行。亚马逊实施了反抓取措施,所以唯一的方法是使用他们的 API:

For automated access to price change or offer listing change events please refer to the MWS Subscription API: https://developer.amazonservices.com/gp/mws/api.html/277-5993977-7749460?ie=UTF8&section=subscriptions&group=subscriptions&version=latest


=REGEXREPLACE(REGEXEXTRACT(QUERY(IMPORTXML(
 "https://paytmmall.com/led-night-light-wireless-tap-touch-night-lamp-light-battery-powered-wardrobe-kitchen-cabinet-closet-push-stick-on-lamps-HOMLED-NIGHT-LIGLOB317966D12FA2A-pdp",
 "//*"), "where Col1 contains'""price"":' limit 1"),
 "price"":(.*)""a"), ",$", "")