There are a few built-in user agents, all beginning with ua_.

splash_user_agent(splash_obj, user_agent = ua_splashr)

ua_splashr

ua_win10_chrome

ua_win10_firefox

ua_win10_ie11

ua_win7_chrome

ua_win7_firefox

ua_win7_ie11

ua_macos_chrome

ua_macos_safari

ua_linux_chrome

ua_linux_firefox

ua_ios_safari

ua_android_samsung

ua_kindle

ua_ps4

ua_apple_tv

ua_chromecast

Arguments

splash_obj

splashr object

user_agent

1 element character vector, defaults to splashr/#.#.#.

Format

An object of class character of length 1.

Examples

# NOT RUN {
library(rvest)

URL <- "https://httpbin.org/user-agent"

splash_local %>%
  splash_response_body(TRUE) %>%
  splash_user_agent(ua_macos_chrome) %>%
  splash_go(URL) %>%
  splash_html() %>%
  html_text("body") %>%
  jsonlite::fromJSON()
# }