我想从网上抓取过去五年的股票市场历史数据。但是我的代码只给了我100行的数据,而网站上的表格要长得多。你知道我错在哪里吗?
library("rvest")
library("dplyr")
url <- "https://finance.yahoo.com/quote/BAC/history?period1=1540512000&period2=1698278400& interval=1d&filter=history&frequency=1d&includeAdjustedClose=true"
dt <- read_html(url)
dt %>% html_table(fill = T)
字符串
1条答案
按热度按时间zsohkypk1#
您可以使用
tidyquant
从Yahoo获取安全价格字符串
的数据