Is there a way to modify the R code below in order to extract Quarterly data? I am attempting to retrieve data from Yahoo Finance, which is a dynamic web page using AJAX, resulting in the same address for both Annual and Quarterly data. The selector to use is 'button.P\(0px\)'. While I have successfully extracted the Annual data for the Income Statement table for AAPL, I am facing challenges in retrieving Quarterly data. Any guidance or suggestions would be greatly appreciated :)
library(rvest)
url <- 'https://finance.yahoo.com/quote/AAPL/financials?p=AAPL'
webpage <- read_html(url)
tableIS <- html_table(html_nodes(webpage,'table.Lh\\(1\\.7\\)'), header = NA, trim = TRUE, fill = FALSE, dec = ".")
print (tableIS)