【发布时间】:2019-05-25 17:03:06
【问题描述】:
我正在尝试从“https://www.zipcodestogo.com/county-zip-code-list.htm”中提取邮政编码,其中州和县将在数据集中提供。以阿拉巴马州戴尔为例(如下图所示)。但是,当我使用 Selector Gadget 提取表格时,它并没有出现,当我查看源代码时,我也没有找到这个表格。我不知道如何解决这个问题。我对网络抓取非常陌生,所以如果这是一个愚蠢的问题,我提前道歉。谢谢。
zipurl = 'https://www.zipcodestogo.com/county-zip-code-list.htm'
query = list('State:'="Alabama",
'Counties:'="Dale"
)
website = POST(zipurl, body = query,encode = "form")
tables <- html_nodes(content(website), css = 'table')
【问题讨论】:
标签: css r web-scraping