How do I scrape the last 10 Keno draws from the Georgia lottery into R?

I'm trying to pull the last 10 draws of a Keno lottery game into R.  I've
read several tutorials on how to scrape websites using the rvest package,
Chrome's Inspect Element, and CSS or XPath, but I'm likely stuck because
the table I seek is dynamically generated using Javascript.



I started with:

>        install.packages("rvest")

>   library(rvest)

>        Kenopage <- "
https://www.galottery.com/en-us/games/draw-games/keno.html#tab-winningNumbers
"

> Keno <- Read.hmtl(Kenopage)

>From there, I've been unable to progress, despite hours spend on
combinations of CSS and XPath calls with "html_notes."

Failed example: DrawNumber <- Keno %>% rvest::html_nodes("body") %>%
xml2::xml_find_all("//span[contains(@class,'Draw Number')]") %>%
rvest::html_text()



Someone mentioned using the V8 package in R, but it's new to me.

How do I get started?

-- 

Julio Farach
https://www.linkedin.com/in/farach
cell phone:  804/363-2161
email:  jfar...@gmail.com

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to