I want to extract the table under the Option Chain tab of the following webpage using R -
https://nseindia.com/get-quotes/derivatives?symbol=SBIN
I am trying to use rvest for this purpose, however the standard way of extracting tables from simple html based webpages don't seem to be working.
The following is what I'm trying -
library('rvest')
x <- c('https://nseindia.com/get-quotes/derivatives?symbol=SBIN')
url <- paste(x,collapse="")
webpage <- read_html(url)
data <- webpage %>% html_nodes(xpath = '//*[@id="optionChainTable-equity"]') %>% html_table()
This is returning an empty list. What am I missing?