Screen Link:
My Code: <!–
scraper <- function(url,selector,output = "text", all_nodes = TRUE) {
content<- read_html(url)
if(all_nodes){
all_nodes <- html_nodes
} else { all_nodes <- html_node }
if(output == "text"){
output <- html_text()
}else if (output == "table"){
output <- html_table()
}else if (output == "attrs"){
output <- html_attrs()
}else{output <- html_attr()
}
scrape <- content %>% all_nodes(selector) %>% output
scrape
}
```-->
Replace this line with your code
What I expected to happen:
I expect this
scraper(url = "http://dataquestio.github.io/web-scraping-pages/2014_super_bowl.html",
selector = "table tr:nth-child(3) td")
to work
What actually happened:
Error in xml2::xml_text(x, trim = trim) : argument "x" is missing, with no default