Hi there I am trying to scrape a few tables from this website. https://money.tmx.com/en/quote/DOO/options
I have tried both an xpath and css. It seems that the java script is causing an issue. Here are my attempts
CSS:
library(rvest)
library(tidyverse)
ticker = "DOO"
url = sprintf('https://money.tmx.com/en/quote/%s/options', ticker)
page = read_html(url) %>%html_nodes(css = "div.options-table-wrap:nth-child(5)")
XPATH:
library(rvest)
library(tidyverse)
ticker = "DOO"
url = sprintf('https://money.tmx.com/en/quote/%s/options', ticker)
page = read_html(url) %>%html_nodes(xpath = "//*[@id="DataTables_Table_0"]")
Neither of these return anything. Your help would be much appreciated.
RSeleniumorwebdriverpackage, which loads javascripts. On the difference betweenrvestand the two mentioned packages: stackoverflow.com/questions/57370389/…https://app.quotemedia.com/datatool/getOptionQuotes.json- it comes with a copyright warning,