来自B3 / BM&F Bovespa的网页抓取

问题描述

我正在尝试从BM&FBOVESPA参考价格页面下载一些数据。

他们的网页是...

http://www.b3.com.br/en_us/market-data-and-indices/data-services/market-data/reports/derivatives-market/reference-prices/bm-fbovespa-reference-rates/

并且框架是...

http://www2.bmf.com.br/pages/portal/bmfbovespa/lumis/lum-taxas-referenciais-bmf-ptBR.asp

这是我的代码,给我一个错误:错误出[j + k,]:下标超出范围

#URL which contains the data 
url <- 'http://www2.bmf.com.br/pages/portal/bmfbovespa/lumis/lum-taxas-referenciais-bmf-ptBR.asp'

#Read the HTML from the URL
site <- read_html(url)

#Save the table as "list"
lista_tabela <- site %>%
  html_nodes("table") %>%
  html_table(fill = TRUE) 

#"list" to df
CurvaDI <- lista_tabela[[1]]

我无法纠正此错误,只能从他们的网站下载表格并将其另存为df。

此外,我正在尝试通过一个代码下载多个期间。如果有人可以帮忙,那就开心了!

非常感谢!

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)