The final_answer parsing was returning NA. It looks like a slight modification in the regex is all that was needed. Here is a PR that implements that change. Below is a reprex showing the result of the change:
library(whatr)
game <- whatr_html(x = 1000, out = "showgame")
final_answer_current <- game %>%
rvest::html_node(".final_round") %>%
base::as.character() %>%
stringr::str_split("class") %>%
base::unlist() %>%
stringr::str_subset("correct_response") %>%
stringr::str_extract("(?<=i>)(.*)(?=</i>)") %>%
stringr::str_to_title()
final_answer_new <- game %>%
rvest::html_node(".final_round") %>%
base::as.character() %>%
stringr::str_split("class") %>%
base::unlist() %>%
stringr::str_subset("correct_response") %>%
stringr::str_extract("(?<=>)(.*)(?=</em>)") %>%
stringr::str_to_title()
final_answer_current
#> [1] NA
final_answer_new
#> [1] "The Castrati"
The final_answer parsing was returning NA. It looks like a slight modification in the regex is all that was needed. Here is a PR that implements that change. Below is a reprex showing the result of the change:
Created on 2020-02-26 by the reprex package (v0.3.0)