I´m trying to scrap this website https://www.nasdaq.com/market-activity/ipos to get the UNCOMING and PRICED IPO tables but Rstudio crash always I use rvest.
This is my code:
library(rvest)
url="https://www.nasdaq.com/market-activity/ipos"
web <- read_html(url)
datos_web <- web %>%
html_nodes(xpath = '//*[@]') %>%
html_table()
How can I do to get this tables into a dataframe?
CodePudding user response:
I don't know if something has changed on the site but you can get the required data from this link which I found from the Networks tab on the webpage.
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
Similarly, priced data can be found at data$data$priced$rows
.