我正试图在上刮这个网站https://www.nasdaq.com/market-activity/ipos,以获得即将上市和定价的IPO表格,但Rstudio总是使用rvest。
这是我的密码:
library(rvest)
url="https://www.nasdaq.com/market-activity/ipos"
web <- read_html(url)
datos_web <- web %>%
html_nodes(xpath = '//*[@class="market-calendar-table__table"]') %>%
html_table()我怎样才能把这张桌子放到数据仓库里呢?
发布于 2021-11-13 07:11:38
我不知道网站上是否有什么变化,但您可以从这链接中获得所需的数据,这是我从网页上的网络选项卡中找到的。
library(jsonlite)
data <- fromJSON('https://api.nasdaq.com/api/ipo/calendar?date=2021-11')
data$data$upcoming$upcomingTable$rows
# dealID proposedTickerSymbol companyName proposedExchange
#1 816750-100864 SG Sweetgreen, Inc. NYSE
#2 1182126-100788 KLC KC Holdco, LLC NYSE
#3 1171463-98726 HORIU Emerging Markets Horizon Corp. NASDAQ Global
#4 888571-100721 USER UserTesting, Inc. NYSE
#5 1183593-100874 IREN Iris Energy Ltd NASDAQ Global Select
#6 1028510-100829 BRZE Braze, Inc. NASDAQ Global Select
#7 1160405-97685 IRRXU INTEGRATED RAIL & RESOURCES ACQUISITION CORP NYSE
# proposedSharePrice sharesOffered expectedPriceDate dollarValueOfSharesOffered
#1 23.00-25.00 12,500,000 11/18/2021 $359,375,000
#2 18.00-21.00 25,775,434 11/18/2021 $622,476,729.00
#3 10.00 25,000,000 11/18/2021 $287,500,000
#4 15.00-17.00 14,169,407 11/17/2021 $277,011,906.00
#5 25.00-27.00 8,269,231 11/17/2021 $256,759,605.00
#6 55.00-60.00 8,000,000 11/17/2021 $528,000,000.00
#7 10.00 20,000,000 11/12/2021 $200,000,000同样,定价数据也可以在data$data$priced$rows上找到。
https://stackoverflow.com/questions/69952178
复制相似问题