使用 ImportXML 和 XPath 捕获元素 [英] Capture element using ImportXML with XPath

查看:26
本文介绍了使用 ImportXML 和 XPath 捕获元素的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试通过 Google 表格从页面中获取以下信息作为示例 .

所需的信息可以从 Web 中使用 Excel 提取.

I'm trying to get the following information via Google Sheets from the page as an example here.

I have to retrieve these two items circled in red as in the attached screenshot of scrape data interest.

I've tried this, but it does not work (in A1 there is the link, and B1 the formula):

=IMPORTXML(A1;"/html/body/div[1]/div[2]/div[1]/span[1])

=IMPORTXML(A1;"/html/body/div[1]/div[3]/table/tbody/tr[1]/td[3])

Is there anyone who can please help me?

解决方案

Their robots.txt file:

User-Agent: *  
Disallow: /

The "User-agent: *" means this section applies to all robots. The "Disallow: /" tells the robot that it should not visit any pages on the site..

Information required could be extracted with Excel, From Web.

这篇关于使用 ImportXML 和 XPath 捕获元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆