library(rvest); library(XML); library(magrittr)
#> Loading required package: xml2
#>
#> Attaching package: 'XML'
#> The following object is masked from 'package:rvest':
#>
#> xml
url <- 'http://www.screener.in/company/526965'
basic <- read_html(url)
basic %>% html_nodes('#balancesheet div')
#> {xml_nodeset (0)}
readHTMLTable(url)
#> named list()
如果您转到网址链接,则会有某些表格。我想在R中引入资产负债表。从代码中可以看出,readHTMLTable()
和html_nodes()
都返回空白而不是表格。