Dear community,
I have created a shiny app to scrape the "google title" from the google page ("https://google.com"). To scrape this, I have used R chromote package. The app works fine while running on the desktop. However, once It is hosted on shinyapps.io server, two users can not use it concurrently. The code for the app is in below,
---------------------- Code (findGoogleTitle.R) -------------------------------
library(shiny)
library(curl)
library(chromote)
library(pagedown)ui <- fluidPage(
textOutput("result")
)server <- function(session, input, output) {
driver <- ChromoteSession$new()
driver$Page$navigate("https://google.com") # open Google page
Sys.sleep(7)
output$result <- renderText(driver$Runtime$evaluate('document.querySelector("title").innerText')$result$value) # scrape Google title
}
shinyApp(ui = ui, server = server)
---------------------- End --------------------------------
Output:
- Click on: https://sale4cast.shinyapps.io/findGoogleTitle/
- Wait 5 seconds.
- Get the google title "Google"Question: How can two users access the app concurrently via shinyapps.io?.
Best Regards,
SaleForecast