问题描述
我正在尝试使用导入XML和XPath收集一些《福布斯》文章的数据.我想在此页面上拉文章视图 http://www.forbes.com/sites/kurtbadenhausen/2014/07/20/rory-mcilroy-is-golfs-leading-man-with-british-open-win/
I am trying to collect some data on a few Forbes articles using import XML and XPath. I want to pull article views on this page http://www.forbes.com/sites/kurtbadenhausen/2014/07/20/rory-mcilroy-is-golfs-leading-man-with-british-open-win/
我正在使用它.
=IMPORTXML("http://www.forbes.com/sites/kurtbadenhausen/2014/07/20/rory-mcilroy-is-golfs-leading-man-with-british-open-win/", "//html/body/div[5]/section[1]/div[2]/hgroup/h5/span")
我不断得到的答复是
Import Internal Error
推荐答案
您的XPath找不到任何元素.如果您之前没有访问过《福布斯》网站,那么它会在实际内容页面之前显示另一个图层页面.因此,Google看到的是该图层页面,而不是文章内容.
Your XPath is not finding any element. The Forbes site is displaying another layer page before the actual content page if you have not accessed it before. Hence, Google sees this layer page instead of the article content.
因此,您不能使用Google Spreadsheet导入此页面.
Hence, you can not import this page using Google Spreadsheet.
这篇关于使用Xpath for Spreadsheets导入XML,并说"import internal error"(导入内部错误).的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!