本文介绍了使用 Google 表格进行网页抓取的指南的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试使用导入 XML 从网页中获取一些数据,但它告诉我N/A 导入的内容为空"
I'm trying to get some data from a web page using import XML but it tells me "N/A Imported content is empty"
我尝试了不同的查询,但没有奏效.
I've tried with a different query but is not working.
=IMPORTXML("https://www.shein.com/Floral-Lace-Halter-Teddy-Bodysuit-p-699186-cat-1862.html","//div[@class='opt-size j-sa-select-size j-opt-size']")
我希望能够解析服装的不同尺寸,即:XS、S、M、L 等
I want to be able to parse the different sizes of the clothing, that would be: XS, S, M, L, etc.
推荐答案
Google 表格不支持对 JavaScript 控制元素进行网页抓取.您可以通过禁用给定站点的 JS 来轻松检查它,并且只能抓取可见的内容.不幸的是,在您的情况下,这没什么:
Google Sheets does not support web scraping of JavaScript controlled elements. you can easily check it by disabling JS for a given site and only what's left visible can be scraped. in your case, that's nothing, unfortunately:
这篇关于使用 Google 表格进行网页抓取的指南的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!