library(rvest)
library(tidyverse)
library(RSelenium)
url <- read_html("http://ctemspublic.pcctg.net/")
url %>%
html_nodes(".ng-binding") %>%
html_text()
## character(0)
url %>%
html_nodes(".electionlabel") %>%
html_text()
## [1] "ELECTION CENTER"
url %>%
html_nodes(".listofNomiees a") %>%
html_text()
## [1] "Legislative Districts by Town"
url %>%
html_nodes("strong , #current , #current_sub") %>%
html_text()
## [1] "Statewide" "Registered Voters Reported:"
## [3] "Towns Partially Reported: " "Precincts Reported: "
## [5] "Voters Checked Reported:" "Towns Completely Reported: "
## [7] "Voter Turnout (%):" "Summary"
url %>%
html_nodes(".bgblue") %>%
html_text()
## [1] "\r\n ELECTION CENTER\r\n Select Election:\r\n \r\n -- Select Election --\r\n \r\n {{value}}\r\n \r\n \r\n \r\n Legislative Districts by Town\r\n "
## [2] "\r\n \r\n \r\n Official Results\r\n \r\n \r\n \r\n \r\n "
fin.