如何识别要抓取的表类型?

问题描述 投票:0回答:0

我至少几年没有抓取过任何东西,所以我希望能得到关于如何在这里抓取大约 260k 行表的指示,这似乎可能在表的不规则一侧,如 ESRI/ArcGIS 的明显输出(我在检查元素时看到“esri”)。我不确定它是什么类型的表,以及“rvest”是否适合此页面?我尝试使用 SelectorGadget 来查找表格元素的适当名称,但没有成功。

https://gispublic.waterboards.ca.gov/portal/home/item.html?id=2d6b184566c740c988b9a2f1b2a8d4a3#data

library(rvest)
html <- read_html("https://gispublic.waterboards.ca.gov/portal/home/item.html?id=2d6b184566c740c988b9a2f1b2a8d4a3#data")
table <- html %>% html_element("unable to find the CSS Selector/X Copy path") %>% html_table()

我走在正确的轨道上吗?

r rvest
© www.soinside.com 2019 - 2024. All rights reserved.