I'm building a Shiny App in R and I'm trying to scrub off the web information about the user's selected Pokemon, but I keep running into the problem of 'Error: SLL certificate problem' when trying to use read_html()
ui:
sidebarPanel(
ui <- fluidPage(
selectInput(inputId = "pokemon1", 'Choose a Pokémon:', c(Pokemon$Name)))),
mainPanel(
verbatimTextOutput("value"))
And then the Server:
server <- function(input, output) {
output$value <- renderPrint({
pokemon <- input$pokemon1
URLpokemon <- paste(c("https://bulbapedia.bulbagarden.net/wiki/", pokemon,"_(Pok%C3%A9mon)"), collapse="")
# Read and parse HTML file
pokemonSummary1 <- URLpokemon%>%
read_html() %>% # R please help me read this HTML code
html_nodes("p")%>% # type of HTML object
.[[1]]%>%
html_text()
pokemonSummary2 <- URLpokemon%>%
read_html() %>% # R please help me read this HTML code
html_nodes("p")%>% # type of HTML object
.[[2]]%>%
html_text()
pokemonSummary3 <- URLpokemon%>%
read_html() %>% # R please help me read this HTML code
html_nodes("p")%>% # type of HTML object
.[[3]]%>%
html_text()
textAlmanac <- paste(c(pokemonSummary1,pokemonSummary2,pokemonSummary3), collapse=" ")
paste(textAlmanac)
})
I'm using this data set: https://gist.github.com/armgilles/194bcff35001e7eb53a2a8b441e8b2c6
and I have no idea where this error is coming from?