1

I am able to scrape the table on this Website:-

https://dailyfantasynerd.com/optimizer/draftkings/nba

using RSelenium package.

enter image description here

The issue is that the Circled Column above is returned as Blank:-

enter image description here

Now, this Column is editable but I only need to scrape its Default Value (for example 50.7 in the first row).

I am using the following code:-

library(RSelenium)
library(rvest)
library(dplyr)

driver = rsDriver(browser = c("firefox"), port = 0001L)

remDr <- driver[["client"]]

url <- 'https://dailyfantasynerd.com/optimizer/draftkings/nba'
remDr$navigate(url)

username <- remDr$findElement(using = "id", value = "input-username")
username$sendKeysToElement(list("xx"))

#send password and Enter
passwd <- remDr$findElement(using = "id", value = "input-password")
passwd$sendKeysToElement(list("xx", "\uE007"))


#get all the tables from webapage 
df = (remDr$getPageSource()[[1]] %>% 
  read_html() %>% html_table())[[7]]
Abdul Basit Khan
  • 646
  • 1
  • 6
  • 19
  • The column you are referring needs subscription plan. The table is located inside `iframe` maybe refer, https://stackoverflow.com/questions/41290620/click-on-cross-domain-iframe-element-using-rselenium – Nad Pat Mar 05 '22 at 15:35
  • I see. I do have subscription to this website. I can share with you the credentials. Would we able to scrape this data after we have logged in ? – Abdul Basit Khan Mar 05 '22 at 16:09
  • Are you sure you have the correct html node? It might be that the `Proj` ,`FP` column are stored in a different node. – On_an_island Mar 15 '22 at 17:06

0 Answers0