R/id_extractor.R

Defines functions id_extractor

id_extractor <- function(html_doc, ids) {
  
  r <- rvest::html_nodes(html_doc, xpath = paste(ids, collapse = "|"))
  
  as.list(r %>% rvest::html_text()) %>% 
    purrr::set_names(r %>% rvest::html_name()) %>% 
    tibble::as_tibble()
}
krose/entsoeR documentation built on Oct. 10, 2020, 4:35 p.m.