我有一个简单的问题:我试图从网页中删除赔率,但结果是一个空白列表
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)