Rvest刮取结果是空列表

时间:2017-08-20 09:52:02

标签: web-scraping rvest

我有一个简单的问题:我试图从网页中删除赔率,但结果是一个空白列表

library(rvest)
url<- 'http://www.betexplorer.com/soccer/italy/serie-a-2016-2017/'
html <- read_html(url)
odds <- html_nodes(html, '.table-matches__odds , .colored span')
odds <- html_text(odds)

此外,我尝试使用xpath而不是css选择器,但我有相同的结果。

library(rvest)
url<- 'http://www.betexplorer.com/soccer/italy/serie-a-2016-2017/'
html <- read_html(url)
odds <- html_nodes(html, xpath='//*[contains(concat( " ", @class, " " ),   concat( " ", "table-matches__odds", " " ))]')
odds <- html_text(odds)

0 个答案:

没有答案