I want to host a shiny application which uses Rselenium for web scrapping. How can I host it on shinyapp.io?
Here is my code:
library(shiny)
library(RSelenium)
library(netstat)
library(tidyverse)
library(crayon)
ui <- fluidPage(
actionButton("btn", "Click Me!"),
textOutput("txt"),
)
server <- function(input, output, session) {
observeEvent(input$btn, {
#connect chrome driver
client_server <- rsDriver(
browser = "chrome",
chromever = "119.0.5735.90",
verbose = FALSE,
port = free_port(),
)
# connect remote driver to client
driver <- client_server$client
driver$maxWindowSize()
driver$navigate("https://google.com")
output$txt <- renderText("Clicked!")
})
}
shinyApp(ui, server)
I try to host it but it returns a big error. The error contains:
E: Package 'phantomjs' has no installation candidate## End Task Log ################################################################
Error: Unhandled Exception: Child Task 1355100025 failed: Error building image: Build exited with non-zero status: 100
Execution halted