Keno <- read_html(Kenopage) ? Or Am I misunderstanding the problem?
On Sun, 19 Apr 2020 at 15:10, Julio Farach <jfar...@gmail.com> wrote: > 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. > -- John Kane Kingston ON Canada [[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.