I would like to scrape the text "VIRGINIA TECH" from the site http://stats.statbroadcast.com/statmonitr/?id=102197 using the package RSelenium.
the css selector for the particular text I would like to scrape is:
.valigntop:nth-child(1) .width6-3-4.marginr
After opening the remote driver and navigating to the site I try:
webElem <- remDr$findElement(using = "css selector", '.valigntop:nth-child(1) .width6-3-4.marginr')
doc <- remDr$getPageSource()[[1]]
current_doc <- read_html(doc)
current_doc <- html_text(current_doc)
This returns a big block of text and not the text I want "VIRGINIA TECH".
After scrape what I would like:
current_doc
[1] "VIRGINIA TECH"
Any help will be appreciated. Please let me know if any further information is needed.