【发布时间】:2021-03-12 17:06:56
【问题描述】:
我正在尝试从 ICE 网站 (https://www.theice.com/clear-us/risk-management#margin-rates) 下载包含保证金策略信息的数据文件。我试图通过在 R 中应用以下代码来做到这一点:
page <- read_html("https://www.theice.com/clear-us/risk-management#margin-rates")
raw_list <- page %>% # takes the page above for which we've read the html
html_nodes("a") %>% # find all links in the page
html_attr("href") %>% # get the url for these links
str_subset("\\.csv") # find those that end in csv only
但是,它只能找到两个 csv 文件。也就是说,当点击 Margin Rates 并转到 Historic ICE Risk Model Parameter 时,它不会检测到任何显示的文件。见下文
raw_list
[1] "/publicdocs/iosco_reporting/haircut_history/icus/ICUS_Asset_Haircuts_History.csv"
[2] "/publicdocs/iosco_reporting/haircut_history/icus/ICUS_Currency_Haircuts_History.csv"
我想知道如何才能做到这一点,所以稍后我可以选择文件并下载它们。
提前非常感谢
【问题讨论】: